Révision 8c72e82a
Ajouté par Assos Assos il y a environ 7 ans
drupal7/sites/all/modules/webform/components/time.inc | ||
---|---|---|
86 | 86 |
'#type' => 'radios', |
87 | 87 |
'#title' => t('Default value timezone'), |
88 | 88 |
'#default_value' => $component['extra']['timezone'], |
89 |
'#description' => t('If using relative dates for a default value (e.g. "now") base the current time on this timezone.'),
|
|
89 |
'#description' => t('If using relative dates for a default value (for example, "now") base the current time on this timezone.'),
|
|
90 | 90 |
'#options' => array('user' => t('User timezone'), 'site' => t('Website timezone')), |
91 | 91 |
'#weight' => 2, |
92 | 92 |
'#access' => variable_get('configurable_timezones', 1), |
... | ... | |
118 | 118 |
} |
119 | 119 |
|
120 | 120 |
/** |
121 |
* Implements hook_form_id_validate. |
|
121 |
* Implements hook_form_id_validate().
|
|
122 | 122 |
* |
123 | 123 |
* Validate start and end times. |
124 | 124 |
*/ |
... | ... | |
214 | 214 |
} |
215 | 215 |
else { |
216 | 216 |
$hours = array_intersect_key($hours, array_flip(range($start_hour, 23))) + |
217 |
array_intersect_key($hours, array_flip(range(0, $end_hour)));
|
|
217 |
array_intersect_key($hours, array_flip(range(0, $end_hour))); |
|
218 | 218 |
} |
219 | 219 |
} |
220 | 220 |
|
... | ... | |
325 | 325 |
|
326 | 326 |
// Enforce the start and end times, if any. |
327 | 327 |
$timestamp = strtotime($element['hour']['#value'] . ':' . $element['minute']['#value'] . ' ' . |
328 |
(isset($element['ampm']) ? $element['ampm']['#value'] : ''));
|
|
328 |
(isset($element['ampm']) ? $element['ampm']['#value'] : '')); |
|
329 | 329 |
$start_time = strtotime($element['#start_time']); |
330 | 330 |
$end_time = strtotime($element['#end_time']); |
331 | 331 |
$subs = array( |
Formats disponibles : Unified diff
Weekly update of contrib modules