? .DS_Store
? contact_form_perm._00.patch
? contact_form_perm._01.patch
? contact_function_names_00.patch
? contact_submit_button_00.patch
? contact_submit_button_01.patch
? regional_settings_00.patch
? regional_settings_01.patch
? test.patch
? test2.patch
? user_settings_00.patch
? user_settings_01.patch
? modules/.DS_Store
? sites/.DS_Store
? sites/default/files
? sites/default/settings.php
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.140
diff -u -p -r1.140 system.admin.inc
--- modules/system/system.admin.inc	3 May 2009 07:35:37 -0000	1.140
+++ modules/system/system.admin.inc	11 May 2009 20:25:18 -0000
@@ -1531,7 +1531,7 @@ function system_regional_settings() {
 
   $form['locale'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Locale settings'),
+    '#title' => t('Locale'),
   );
 
   $form['locale']['site_default_country'] = array(
@@ -1539,65 +1539,63 @@ function system_regional_settings() {
     '#title' => t('Default country'),
     '#default_value' => variable_get('site_default_country', ''),
     '#options' => $countries,
-    '#description' => t('Select the default country for the site.'),
     '#attributes' => array('class' => 'country-detect'),
   );
 
-  $form['locale']['date_default_timezone'] = array(
-    '#type' => 'select',
-    '#title' => t('Default time zone'),
-    '#default_value' => variable_get('date_default_timezone', date_default_timezone_get()),
-    '#options' => $zones,
-    '#description' => t('Select the default time zone for the site.'),
-  );
-
   $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['timezone'] = array(
     '#type' => 'fieldset',
-    '#title' => t('User time zones'),
+    '#title' => t('Time zones'),
+  );
+
+  $form['timezone']['date_default_timezone'] = array(
+    '#type' => 'select',
+    '#title' => t('Default time zone'),
+    '#default_value' => variable_get('date_default_timezone', date_default_timezone_get()),
+    '#options' => $zones,
   );
 
+  $configurable_timezones = variable_get('configurable_timezones', 1);
   $form['timezone']['configurable_timezones'] = array(
-    '#type' => 'radios',
-    '#title' => t('User-configurable time zones'),
-    '#default_value' => variable_get('configurable_timezones', 1),
-    '#options' => array(0 => t('Disabled'), 1 => t('Enabled')),
-    '#description' => t('When enabled, users can set their own time zone and dates will be displayed accordingly.')
+    '#type' => 'checkbox',
+    '#title' => t('Users may set their own time zone.'),
+    '#default_value' => $configurable_timezones,
   );
 
-  $form['timezone']['user_default_timezone'] = array(
-    '#type' => 'radios',
-    '#title' => t('User time zone defaults'),
-    '#default_value' => variable_get('user_default_timezone', DRUPAL_USER_TIMEZONE_DEFAULT),
-    '#options' => array(
-      DRUPAL_USER_TIMEZONE_DEFAULT => t('New users will be set to the default time zone at registration.'),
-      DRUPAL_USER_TIMEZONE_EMPTY   => t('New users will get an empty time zone at registration.'),
-      DRUPAL_USER_TIMEZONE_SELECT  => t('New users will select their own time zone at registration.'),
-    ),
-    '#description' => t('Method for setting user time zones at registration when user-configurable time zones are enabled. This only affects the initial time zone setting for a new registration. Users will be able to change their time zone any time they edit their account.')
+  $js_hide = !$configurable_timezones ? ' class="js-hide"' : '';
+  $form['timezone']['configurable_timezones_wrapper'] =  array(
+    '#prefix' => '<div id="empty-timezone-message-wrapper"' . $js_hide . '>',
+    '#suffix' => '</div>',
   );
 
-  $form['timezone']['empty_timezone_message'] = array(
-    '#type' => 'radios',
-    '#title' => t('Empty user time zones'),
+  $form['timezone']['configurable_timezones_wrapper']['empty_timezone_message'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Remind users at login if their time zone is not set.'),
     '#default_value' => variable_get('empty_timezone_message', 0),
+    '#description' => t('Only applied if users may set their own time zone.')
+  );
+
+  $form['timezone']['configurable_timezones_wrapper']['user_default_timezone'] = array(
+    '#type' => 'radios',
+    '#title' => t('Time zone for new users'),
+    '#default_value' => variable_get('user_default_timezone', DRUPAL_USER_TIMEZONE_DEFAULT),
     '#options' => array(
-      0 => t('Ignore empty user time zones.'),
-      1 => t('Remind users at login if their time zone is not set.'),
+      DRUPAL_USER_TIMEZONE_DEFAULT => t('Default time zone.'),
+      DRUPAL_USER_TIMEZONE_EMPTY   => t('Empty time zone.'),
+      DRUPAL_USER_TIMEZONE_SELECT  => t('Users may set their own time zone at registration.'),
     ),
-    '#description' => t('Handling for empty user time zones when user-configurable time zones are enabled. Use this option to help ensure that users set the correct time zone.')
+    '#description' => t('Only applied if users may set their own time zone.')
   );
 
   $form['date_formats'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Formatting'),
+    '#title' => t('Date formats'),
   );
 
   $date_format_short = variable_get('date_format_short', $date_short[1]);
@@ -1609,7 +1607,6 @@ function system_regional_settings() {
     '#attributes' => array('class' => 'date-format'),
     '#default_value' => (isset($date_short_choices[$date_format_short]) ? $date_format_short : 'custom'),
     '#options' => $date_short_choices,
-    '#description' => t('The short format of date display.'),
   );
 
   $default_short_custom = variable_get('date_format_short_custom', (isset($date_short_choices[$date_format_short]) ? $date_format_short : ''));
@@ -1632,7 +1629,6 @@ function system_regional_settings() {
     '#attributes' => array('class' => 'date-format'),
     '#default_value' => (isset($date_medium_choices[$date_format_medium]) ? $date_format_medium : 'custom'),
     '#options' => $date_medium_choices,
-    '#description' => t('The medium sized date display.'),
   );
 
   $default_medium_custom = variable_get('date_format_medium_custom', (isset($date_medium_choices[$date_format_medium]) ? $date_format_medium : ''));
@@ -1655,7 +1651,6 @@ function system_regional_settings() {
     '#attributes' => array('class' => 'date-format'),
     '#default_value' => (isset($date_long_choices[$date_format_long]) ? $date_format_long : 'custom'),
     '#options' => $date_long_choices,
-    '#description' => t('Longer date format used for detailed display.')
   );
 
   $default_long_custom = variable_get('date_format_long_custom', (isset($date_long_choices[$date_format_long]) ? $date_format_long : ''));
Index: modules/system/system.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.js,v
retrieving revision 1.24
diff -u -p -r1.24 system.js
--- modules/system/system.js	27 Apr 2009 20:19:38 -0000	1.24
+++ modules/system/system.js	11 May 2009 20:25:18 -0000
@@ -113,6 +113,19 @@ Drupal.behaviors.dateTime = {
 };
 
 /**
+ * Show/hide settings for user configurable time zones depending on whether
+ * users are able to set their own time zones or not.
+ */
+Drupal.behaviors.userTimeZones = {
+  attach: function (context, settings) {
+    $('#empty-timezone-message-wrapper .description').hide();
+    $('#edit-configurable-timezones', context).change(function () {
+      $('#empty-timezone-message-wrapper').toggle();
+    });
+  },
+};
+
+/**
  * Show the powered by Drupal image preview
  */
 Drupal.behaviors.poweredByPreview = {
