summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bulk_export/bulk_export.css2
-rw-r--r--bulk_export/bulk_export.module36
2 files changed, 27 insertions, 11 deletions
diff --git a/bulk_export/bulk_export.css b/bulk_export/bulk_export.css
index 14ac83b..d7bafdd 100644
--- a/bulk_export/bulk_export.css
+++ b/bulk_export/bulk_export.css
@@ -16,7 +16,7 @@ div.export-container table td {
margin: 0;
border-right: none;
border-left: none;
- vertical-align: center;
+ vertical-align: middle;
}
div.export-container .select-all {
diff --git a/bulk_export/bulk_export.module b/bulk_export/bulk_export.module
index 66f8aff..ad8f67a 100644
--- a/bulk_export/bulk_export.module
+++ b/bulk_export/bulk_export.module
@@ -187,15 +187,15 @@ function bulk_export_export($cli = FALSE, $options = array()) {
*
*/
function bulk_export_export_form($form, &$form_state) {
- $form['tables'] = array(
- '#prefix' => '<div class="clearfix">',
- '#suffix' => '</div>',
- '#tree' => TRUE,
- );
+
$files = system_rebuild_module_data();
- $options = array();
+ $form['additional_settings'] = array(
+ '#type' => 'vertical_tabs',
+ );
+
+ $options = $tables = array();
foreach ($form_state['exportables'] as $table => $list) {
if (empty($list)) {
continue;
@@ -206,9 +206,19 @@ function bulk_export_export_form($form, &$form_state) {
}
$module = $form_state['export_tables'][$table];
- $header = array("{$files[$module]->info['name']}: $table");
+ $header = array($table);
+ $module_name = $files[$module]->info['name'];
+ $tables[] = $table;
- $form['tables'][$table] = array(
+ if (!isset($form[$module_name])) {
+ $form[$files[$module]->info['name']] = array(
+ '#type' => 'fieldset',
+ '#group' => 'additional_settings',
+ '#title' => $module_name,
+ );
+ }
+
+ $form[$module_name]['tables'][$table] = array(
'#prefix' => '<div class="export-container">',
'#suffix' => '</div>',
'#type' => 'tableselect',
@@ -217,6 +227,11 @@ function bulk_export_export_form($form, &$form_state) {
);
}
+ $form['tables'] = array(
+ '#type' => 'value',
+ '#value' => $tables,
+ );
+
$form['name'] = array(
'#type' => 'textfield',
'#title' => t('Module name'),
@@ -239,9 +254,10 @@ function bulk_export_export_form($form, &$form_state) {
function bulk_export_export_form_submit($form, &$form_state) {
$code = array();
$name = empty($form_state['values']['name']) ? 'foo' : $form_state['values']['name'];
+ $tables = $form_state['values']['tables'];
- foreach ($form_state['values']['tables'] as $table => $names) {
- $names = array_keys(array_filter($names));
+ foreach ($tables as $table) {
+ $names = array_keys(array_filter($form_state['values'][$table]));
if ($names) {
natcasesort($names);
ctools_export_to_hook_code($code, $table, $names, $name);