diff --git a/libraries/config/Form.class.php b/libraries/config/Form.class.php index b53d86f85..7aa8468b0 100755 --- a/libraries/config/Form.class.php +++ b/libraries/config/Form.class.php @@ -124,6 +124,8 @@ class Form */ private function _readFormPathsCallback($value, $key, $prefix) { + static $group_counter = 0; + if (is_array($value)) { $prefix .= $key . '/'; array_walk($value, array($this, '_readFormPathsCallback'), $prefix); @@ -132,6 +134,10 @@ class Form $this->default[$prefix . $key] = $value; $value = $key; } + // add unique id to group ends + if ($value == ':group:end') { + $value .= ':' . $group_counter++; + } $this->fields[] = $prefix . $value; } } diff --git a/libraries/config/FormDisplay.class.php b/libraries/config/FormDisplay.class.php index fb0705227..e3b10dc1c 100755 --- a/libraries/config/FormDisplay.class.php +++ b/libraries/config/FormDisplay.class.php @@ -354,9 +354,8 @@ class FormDisplay $value_default = (array) $value_default; break; case 'group': - $text = substr($field, 7); - if ($text != 'end') { - display_group_header($text); + if (substr($field, 7, 4) != 'end:') { // :group:end is changed to :group:end:{unique id} in Form class + display_group_header(substr($field, 7)); } else { display_group_footer(); } diff --git a/libraries/config/FormDisplay.tpl.php b/libraries/config/FormDisplay.tpl.php index 866720815..84c4ee269 100644 --- a/libraries/config/FormDisplay.tpl.php +++ b/libraries/config/FormDisplay.tpl.php @@ -72,7 +72,7 @@ function display_fieldset_top($title = '', $description = '', $errors = null, $a { global $_FormDisplayGroup; - $_FormDisplayGroup = false; + $_FormDisplayGroup = 0; $attributes = array_merge(array('class' => 'optbox'), $attributes); foreach ($attributes as $k => &$attr) { @@ -147,14 +147,13 @@ function display_input($path, $name, $description = '', $type, $value, $value_is $field_class .= ($field_class == '' ? '' : ' ') . ($has_errors ? 'custom field-error' : 'custom'); } $field_class = $field_class ? ' class="' . $field_class . '"' : ''; - $tr_class = $_FormDisplayGroup ? 'group-field' : ''; + $tr_class = $_FormDisplayGroup > 0 + ? 'group-field group-field-' . $_FormDisplayGroup + : ''; if (isset($opts['setvalue']) && $opts['setvalue'] == ':group') { unset($opts['setvalue']); - $tr_class = 'group-header-field'; - if ($_FormDisplayGroup) { - display_group_footer(); - } - $_FormDisplayGroup = true; + $_FormDisplayGroup++; + $tr_class = 'group-header-field group-header-' . $_FormDisplayGroup; } if ($option_is_disabled) { $tr_class .= ($tr_class ? ' ' : '') . 'disabled-field'; @@ -290,19 +289,15 @@ function display_group_header($header_text) { global $_FormDisplayGroup; - if ($_FormDisplayGroup) { - display_group_footer(); - } - $_FormDisplayGroup = true; + $_FormDisplayGroup++; if (!$header_text) { return; } - $colspan = 2; - if (defined('PMA_SETUP')) { - $colspan++; - } + $colspan = defined('PMA_SETUP') + ? 3 + : 2; ?> - + @@ -319,7 +314,7 @@ function display_group_footer() { global $_FormDisplayGroup; - $_FormDisplayGroup = false; + $_FormDisplayGroup--; } /** diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php index cf39b235b..a771ee611 100644 --- a/libraries/config/messages.inc.php +++ b/libraries/config/messages.inc.php @@ -111,6 +111,8 @@ $strConfigExport_odt_relation_name = __('Relations'); $strConfigExport_odt_structure_or_data_name = __('Dump table'); $strConfigExport_onserver_name = __('Save on server'); $strConfigExport_onserver_overwrite_name = __('Overwrite existing file(s)'); +$strConfigExport_quick_export_onserver_name = __('Save on server'); +$strConfigExport_quick_export_onserver_overwrite_name = __('Overwrite existing file(s)'); $strConfigExport_remember_file_template_name = __('Remember file name template'); $strConfigExport_sql_auto_increment_name = __('Add AUTO_INCREMENT value'); $strConfigExport_sql_backquotes_name = __('Enclose table and column names with backquotes'); diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php index af8d28415..8979e2757 100644 --- a/libraries/config/setup.forms.php +++ b/libraries/config/setup.forms.php @@ -256,14 +256,21 @@ $forms['Import']['Open_Document'] = array('Import' => array( 'ods_recognize_percentages', 'ods_recognize_currency')); $forms['Export']['Export_defaults'] = array('Export' => array( - 'method', + 'method' => ':group', + ':group:' . __('Quick'), + 'quick_export_onserver', + 'quick_export_onserver_overwrite', + ':group:end', + ':group:' . __('Custom'), + 'asfile' => ':group', + 'onserver', + 'onserver_overwrite', + ':group:end', + ':group:end', + ':group:end', 'format', 'compression', 'charset', - 'asfile' => ':group', - 'onserver', - 'onserver_overwrite', - ':group:end', 'remember_file_template', 'file_template_table', 'file_template_database', diff --git a/libraries/config/user_preferences.forms.php b/libraries/config/user_preferences.forms.php index 564f09338..bd3202f33 100644 --- a/libraries/config/user_preferences.forms.php +++ b/libraries/config/user_preferences.forms.php @@ -159,12 +159,21 @@ $forms['Import']['Open_Document'] = array( 'Import/ods_recognize_percentages', 'Import/ods_recognize_currency'); $forms['Export']['Export_defaults'] = array( - 'Export/method', + 'Export/method' => ':group', + ':group:' . __('Quick'), + 'Export/quick_export_onserver', + 'Export/quick_export_onserver_overwrite', + ':group:end', + ':group:' . __('Custom'), + 'Export/asfile' => ':group', + 'Export/onserver', + 'Export/onserver_overwrite', + ':group:end', + ':group:end', + ':group:end', 'Export/format', 'Export/compression', 'Export/charset', - 'Export/asfile', - 'Export/remember_file_template', 'Export/file_template_table', 'Export/file_template_database', 'Export/file_template_server'); diff --git a/setup/styles.css b/setup/styles.css index 0cadd100b..93c4887e0 100755 --- a/setup/styles.css +++ b/setup/styles.css @@ -301,10 +301,18 @@ fieldset p + table tr:first-child td, fieldset p + table tr:first-child th { border-top: none; } -fieldset .group-field th { +fieldset .group-field-1 th, fieldset .group-header-2 th { padding-left: 1em; } +fieldset .group-field-2 th, fieldset .group-header-3 th { + padding-left: 2em; +} + +fieldset .group-field-3 th { + padding-left: 3em; +} + fieldset .lastrow, .form .lastrow { background: #F7FBFF; padding: 0.5em; diff --git a/themes/darkblue_orange/css/theme_right.css.php b/themes/darkblue_orange/css/theme_right.css.php index 7062089c6..488ac00c0 100755 --- a/themes/darkblue_orange/css/theme_right.css.php +++ b/themes/darkblue_orange/css/theme_right.css.php @@ -1721,10 +1721,18 @@ fieldset .group-header + tr th { padding-top: 0.6em; } -fieldset .group-field th { +fieldset .group-field-1 th, fieldset .group-header-2 th { padding-left: 1.5em; } +fieldset .group-field-2 th, fieldset .group-header-3 th { + padding-left: 3em; +} + +fieldset .group-field-3 th { + padding-left: 4.5em; +} + fieldset .disabled-field th, fieldset .disabled-field th small, fieldset .disabled-field td { diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 15cf29351..1df6f9ab3 100755 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -1674,10 +1674,18 @@ fieldset .group-header + tr th { padding-top: 0.6em; } -fieldset .group-field th { +fieldset .group-field-1 th, fieldset .group-header-2 th { padding-left: 1.5em; } +fieldset .group-field-2 th, fieldset .group-header-3 th { + padding-left: 3em; +} + +fieldset .group-field-3 th { + padding-left: 4.5em; +} + fieldset .disabled-field th, fieldset .disabled-field th small, fieldset .disabled-field td {