Index: modules/system/admin.css =================================================================== RCS file: /cvs/drupal/drupal/modules/system/admin.css,v retrieving revision 1.14 diff -u -p -r1.14 admin.css --- modules/system/admin.css 14 May 2007 16:22:26 -0000 1.14 +++ modules/system/admin.css 14 May 2007 22:46:56 -0000 @@ -117,9 +117,15 @@ table.screenshot { */ div.date-container { overflow: auto; + clear: left; } -div.date-container > div { +div.date-container > div, div.date-container > div > div { + margin-top: 0px; + margin-bottom: 0px; +} + +div.date-container div { float: left; } Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.476 diff -u -p -r1.476 system.module --- modules/system/system.module 14 May 2007 16:22:26 -0000 1.476 +++ modules/system/system.module 14 May 2007 22:46:57 -0000 @@ -864,7 +864,12 @@ if (Drupal.jsEnabled) { $date_long_choices['custom'] = $date_medium_choices['custom'] = $date_short_choices['custom'] = t('Custom format'); - $form['date_default_timezone'] = array( + $form['locale'] = array( + '#type' => 'fieldset', + '#title' => t('Locale settings'), + ); + + $form['locale']['date_default_timezone'] = array( '#type' => 'select', '#title' => t('Default time zone'), '#default_value' => variable_get('date_default_timezone', 0), @@ -872,16 +877,29 @@ if (Drupal.jsEnabled) { '#description' => t('Select the default site time zone.') ); - $form['configurable_timezones'] = array( + $form['locale']['configurable_timezones'] = array( '#type' => 'radios', - '#title' => t('Configurable time zones'), + '#title' => t('User-configurable time zones'), '#default_value' => variable_get('configurable_timezones', 1), '#options' => array(t('Disabled'), t('Enabled')), - '#description' => t('Enable or disable user-configurable time zones. When enabled, users can set their own time zone and dates will be updated accordingly.') + '#description' => t('When enabled, users can set their own time zone and dates will be displayed accordingly.') + ); + + $form['locale']['date_first_day'] = array( + '#type' => 'select', + '#title' => t('First day of week'), + '#default_value' => variable_get('date_first_day', 0), + '#options' => array(0 => t('Sunday'), 1 => t('Monday'), 2 => t('Tuesday'), 3 => t('Wednesday'), 4 => t('Thursday'), 5 => t('Friday'), 6 => t('Saturday')), + '#description' => t('The first day of the week for calendar views.') + ); + + $form['date_formats'] = array( + '#type' => 'fieldset', + '#title' => t('Formatting'), ); $date_format_short = variable_get('date_format_short', $date_short[1]); - $form['date_format_short'] = array( + $form['date_formats']['date_format_short'] = array( '#prefix' => '
', '#suffix' => '
', '#type' => 'select', @@ -893,7 +911,7 @@ if (Drupal.jsEnabled) { ); $default_short_custom = variable_get('date_format_short_custom', (isset($date_short_choices[$date_format_short]) ? $date_format_short : '')); - $form['date_format_short_custom'] = array( + $form['date_formats']['date_format_short_custom'] = array( '#prefix' => '
', '#suffix' => '
', '#type' => 'textfield', @@ -904,7 +922,7 @@ if (Drupal.jsEnabled) { ); $date_format_medium = variable_get('date_format_medium', $date_medium[1]); - $form['date_format_medium'] = array( + $form['date_formats']['date_format_medium'] = array( '#prefix' => '
', '#suffix' => '
', '#type' => 'select', @@ -916,7 +934,7 @@ if (Drupal.jsEnabled) { ); $default_medium_custom = variable_get('date_format_medium_custom', (isset($date_medium_choices[$date_format_medium]) ? $date_format_medium : '')); - $form['date_format_medium_custom'] = array( + $form['date_formats']['date_format_medium_custom'] = array( '#prefix' => '
', '#suffix' => '
', '#type' => 'textfield', @@ -927,7 +945,7 @@ if (Drupal.jsEnabled) { ); $date_format_long = variable_get('date_format_long', $date_long[0]); - $form['date_format_long'] = array( + $form['date_formats']['date_format_long'] = array( '#prefix' => '
', '#suffix' => '
', '#type' => 'select', @@ -939,7 +957,7 @@ if (Drupal.jsEnabled) { ); $default_long_custom = variable_get('date_format_long_custom', (isset($date_long_choices[$date_format_long]) ? $date_format_long : '')); - $form['date_format_long_custom'] = array( + $form['date_formats']['date_format_long_custom'] = array( '#prefix' => '
', '#suffix' => '
', '#type' => 'textfield', @@ -949,21 +967,13 @@ if (Drupal.jsEnabled) { '#description' => t('A user-defined long date format. See the PHP manual for available options. This format is currently set to display as %date.', array('@url' => 'http://php.net/manual/function.date.php', '%date' => format_date(time(), 'custom', $default_long_custom))), ); - $form['date_first_day'] = array( - '#type' => 'select', - '#title' => t('First day of week'), - '#default_value' => variable_get('date_first_day', 0), - '#options' => array(0 => t('Sunday'), 1 => t('Monday'), 2 => t('Tuesday'), 3 => t('Wednesday'), 4 => t('Thursday'), 5 => t('Friday'), 6 => t('Saturday')), - '#description' => t('The first day of the week for calendar views.') - ); $form = system_settings_form($form); // We will call system_settings_form_submit() manually, so remove it for now. - unset($form['#submit']['system_settings_form_submit']); - $form['#submit']['system_date_time_settings_submit'] = array(); + unset($form['#submit']); return $form; } -function system_date_time_settings_submit($form_id, $form_values) { +function system_date_time_settings_submit($form_values, $form, &$form_state) { if ($form_values['date_format_short'] == 'custom') { $form_values['date_format_short'] = $form_values['date_format_short_custom']; } @@ -973,7 +983,7 @@ function system_date_time_settings_submi if ($form_values['date_format_long'] == 'custom') { $form_values['date_format_long'] = $form_values['date_format_long_custom']; } - return system_settings_form_submit($form_id, $form_values); + return system_settings_form_submit($form_values, $form, $form_state); } /**