diff options
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.admin.inc | 26 | ||||
-rw-r--r-- | modules/system/system.install | 2 | ||||
-rw-r--r-- | modules/system/system.js | 2 | ||||
-rw-r--r-- | modules/system/system.module | 10 |
4 files changed, 27 insertions, 13 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 2e24cf8d3..8b9a844d5 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1524,11 +1524,16 @@ function system_rss_feeds_settings() { * * @ingroup forms * @see system_settings_form() - * @see system_date_time_settings_submit() + * @see system_regional_settings_submit() */ -function system_date_time_settings() { +function system_regional_settings() { drupal_add_js(drupal_get_path('module', 'system') . '/system.js'); - drupal_add_js(array('dateTime' => array('lookup' => url('admin/settings/date-time/lookup'))), 'setting'); + drupal_add_js(array('dateTime' => array('lookup' => url('admin/settings/regional-settings/lookup'))), 'setting'); + + include_once DRUPAL_ROOT . '/includes/locale.inc'; + $countries = country_get_list(); + // Add a 'No default country' option to the start of the list. + $countries = array_merge(array('' => t('No default country')), $countries); // Date settings: $zones = system_time_zones(); @@ -1563,12 +1568,21 @@ function system_date_time_settings() { '#title' => t('Locale settings'), ); + $form['locale']['site_default_country'] = array( + '#type' => 'select', + '#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 site time zone.') + '#description' => t('Select the default time zone for the site.'), ); $form['locale']['date_first_day'] = array( @@ -1696,9 +1710,9 @@ function system_date_time_settings() { } /** - * Process system_date_time_settings form submissions. + * Process system_regional_settings form submissions. */ -function system_date_time_settings_submit($form, &$form_state) { +function system_regional_settings_submit($form, &$form_state) { if ($form_state['values']['date_format_short'] == 'custom') { $form_state['values']['date_format_short'] = $form_state['values']['date_format_short_custom']; } diff --git a/modules/system/system.install b/modules/system/system.install index faef5d4ad..c1c625298 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -3116,7 +3116,7 @@ function system_update_7013() { $timezone = 'UTC'; } variable_set('date_default_timezone', $timezone); - drupal_set_message('The default time zone has been set to <em>' . check_plain($timezone) . '</em>. Please check the ' . l('date and time configuration page', 'admin/settings/date-time') . ' to configure it correctly.', 'warning'); + drupal_set_message('The default time zone has been set to <em>' . check_plain($timezone) . '</em>. Please check the ' . l('date and time configuration page', 'admin/settings/regional-settings') . ' to configure it correctly.', 'warning'); return $ret; } diff --git a/modules/system/system.js b/modules/system/system.js index 221b03b23..c6b6fc4ee 100644 --- a/modules/system/system.js +++ b/modules/system/system.js @@ -99,7 +99,7 @@ Drupal.behaviors.copyFieldValue = { }; /** - * Show/hide custom format sections on the date-time settings page. + * Show/hide custom format sections on the regional settings page. */ Drupal.behaviors.dateTime = { attach: function(context, settings) { diff --git a/modules/system/system.module b/modules/system/system.module index c2e33fb19..2111fdce9 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -70,7 +70,7 @@ function system_help($path, $arg) { $output .= '<li>' . t('support for enabling and disabling <a href="@themes">themes</a>, which determine the design and presentation of your site. Drupal comes packaged with several core themes and additional contributed themes are available at the <a href="@drupal-themes">Drupal.org theme page</a>.', array('@themes' => url('admin/build/themes'), '@drupal-themes' => 'http://drupal.org/project/themes')) . '</li>'; $output .= '<li>' . t('a robust <a href="@cache-settings">caching system</a> that allows the efficient re-use of previously-constructed web pages and web page components. Drupal stores the pages requested by anonymous users in a compressed format; depending on your site configuration and the amount of your web traffic tied to anonymous visitors, Drupal\'s caching system may significantly increase the speed of your site.', array('@cache-settings' => url('admin/settings/performance'))) . '</li>'; $output .= '<li>' . t('a set of routine administrative operations that rely on a correctly-configured <a href="@cron">cron maintenance task</a> to run automatically. A number of other modules, including the feed aggregator, and search also rely on <a href="@cron">cron maintenance tasks</a>. For more information, see the online handbook entry for <a href="@handbook">configuring cron jobs</a>.', array('@cron' => url('admin/reports/status'), '@handbook' => 'http://drupal.org/cron')) . '</li>'; - $output .= '<li>' . t('basic configuration options for your site, including <a href="@date-settings">date and time settings</a>, <a href="@file-system">file system settings</a>, <a href="@clean-url">clean URL support</a>, <a href="@site-info">site name and other information</a>, and a <a href="@site-maintenance">site maintenance</a> function for taking your site temporarily offline.', array('@date-settings' => url('admin/settings/date-time'), '@file-system' => url('admin/settings/file-system'), '@clean-url' => url('admin/settings/clean-urls'), '@site-info' => url('admin/settings/site-information'), '@site-maintenance' => url('admin/settings/site-maintenance'))) . '</li></ul>'; + $output .= '<li>' . t('basic configuration options for your site, including <a href="@regional-settings">date and time settings</a>, <a href="@file-system">file system settings</a>, <a href="@clean-url">clean URL support</a>, <a href="@site-info">site name and other information</a>, and a <a href="@site-maintenance">site maintenance</a> function for taking your site temporarily offline.', array('@regional-settings' => url('admin/settings/regional-settings'), '@file-system' => url('admin/settings/file-system'), '@clean-url' => url('admin/settings/clean-urls'), '@site-info' => url('admin/settings/site-information'), '@site-maintenance' => url('admin/settings/site-maintenance'))) . '</li></ul>'; $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@system">System module</a>.', array('@system' => 'http://drupal.org/handbook/modules/system/')) . '</p>'; return $output; case 'admin/by-module': @@ -677,14 +677,14 @@ function system_menu() { 'page arguments' => array('system_rss_feeds_settings'), 'access arguments' => array('administer site configuration'), ); - $items['admin/settings/date-time'] = array( - 'title' => 'Date and time', + $items['admin/settings/regional-settings'] = array( + 'title' => 'Regional settings', 'description' => "Settings for how Drupal displays date and time, as well as the system's default time zone.", 'page callback' => 'drupal_get_form', - 'page arguments' => array('system_date_time_settings'), + 'page arguments' => array('system_regional_settings'), 'access arguments' => array('administer site configuration'), ); - $items['admin/settings/date-time/lookup'] = array( + $items['admin/settings/regional-settings/lookup'] = array( 'title' => 'Date and time lookup', 'type' => MENU_CALLBACK, 'page callback' => 'system_date_time_lookup', |