Index: system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.430
diff -u -p -r1.430 system.module
--- system.module 17 Dec 2006 21:49:24 -0000 1.430
+++ system.module 24 Dec 2006 09:06:28 -0000
@@ -775,29 +775,6 @@ function system_date_time_settings() {
// Date settings:
$zones = _system_zonelist();
- // Date settings: possible date formats
- $dateshort = array('Y-m-d H:i', 'm/d/Y - H:i', 'd/m/Y - H:i', 'Y/m/d - H:i',
- 'd.m.Y - H:i', 'm/d/Y - g:ia', 'd/m/Y - g:ia', 'Y/m/d - g:ia',
- 'M j Y - H:i', 'j M Y - H:i', 'Y M j - H:i',
- 'M j Y - g:ia', 'j M Y - g:ia', 'Y M j - g:ia');
- $datemedium = array('D, Y-m-d H:i', 'D, m/d/Y - H:i', 'D, d/m/Y - H:i',
- 'D, Y/m/d - H:i', 'F j, Y - H:i', 'j F, Y - H:i', 'Y, F j - H:i',
- 'D, m/d/Y - g:ia', 'D, d/m/Y - g:ia', 'D, Y/m/d - g:ia',
- 'F j, Y - g:ia', 'j F Y - g:ia', 'Y, F j - g:ia', 'j. F Y - G:i');
- $datelong = array('l, F j, Y - H:i', 'l, j F, Y - H:i', 'l, Y, F j - H:i',
- 'l, F j, Y - g:ia', 'l, j F Y - g:ia', 'l, Y, F j - g:ia', 'l, j. F Y - G:i');
-
- // Date settings: construct choices for user
- foreach ($dateshort as $f) {
- $dateshortchoices[$f] = format_date(time(), 'custom', $f);
- }
- foreach ($datemedium as $f) {
- $datemediumchoices[$f] = format_date(time(), 'custom', $f);
- }
- foreach ($datelong as $f) {
- $datelongchoices[$f] = format_date(time(), 'custom', $f);
- }
-
$form['date_default_timezone'] = array(
'#type' => 'select',
'#title' => t('Default time zone'),
@@ -814,28 +791,34 @@ function system_date_time_settings() {
'#description' => t('Enable or disable user-configurable time zones. When enabled, users can set their own time zone and dates will be updated accordingly.')
);
+ $dateshort = variable_get('date_format_short', 'm/d/Y - H:i');
$form['date_format_short'] = array(
- '#type' => 'select',
+ '#type' => 'textfield',
'#title' => t('Short date format'),
- '#default_value' => variable_get('date_format_short', $dateshort[1]),
- '#options' => $dateshortchoices,
- '#description' => t('The short format of date display.')
+ '#default_value' => $dateshort,
+ '#size' => 30,
+ '#maxlength' => 64,
+ '#description' => t('Example: %date
The short format of date display.', array('%date' => format_date(time(), 'custom', $dateshort)))
);
+ $datemedium = variable_get('date_format_medium', 'D, m/d/Y - H:i');
$form['date_format_medium'] = array(
- '#type' => 'select',
+ '#type' => 'textfield',
'#title' => t('Medium date format'),
- '#default_value' => variable_get('date_format_medium', $datemedium[1]),
- '#options' => $datemediumchoices,
- '#description' => t('The medium sized date display.')
+ '#default_value' => $datemedium,
+ '#size' => 30,
+ '#maxlength' => 64,
+ '#description' => t('Example: %date
The medium sized date display.', array('%date' => format_date(time(), 'custom', $datemedium)))
);
+ $datelong = variable_get('date_format_long', 'l, F j, Y - H:i');
$form['date_format_long'] = array(
- '#type' => 'select',
+ '#type' => 'textfield',
'#title' => t('Long date format'),
- '#default_value' => variable_get('date_format_long', $datelong[0]),
- '#options' => $datelongchoices,
- '#description' => t('Longer date format used for detailed display.')
+ '#default_value' => $datelong,
+ '#size' => 30,
+ '#maxlength' => 64,
+ '#description' => t('Example: %date
Longer date format used for detailed display.', array('%date' => format_date(time(), 'custom', $datelong)))
);
$form['date_first_day'] = array(