function jst_timer_admin_settings_submit in Javascript Timer 7
Same name and namespace in other branches
- 8 widgets/jst_timer.module \jst_timer_admin_settings_submit()
1 string reference to 'jst_timer_admin_settings_submit'
- jst_timer_form_alter in widgets/
jst_timer.module - Implementation of hook_form_alter(). Add the timer widget specific settings to admin screen.
File
- widgets/
jst_timer.module, line 536 - Default widget implementation for an up and down timer. This widget does not use hook_ctwidget as it is always included.
Code
function jst_timer_admin_settings_submit($form, &$form_state) {
// Hander formats here and remove so other handler don't try to save them.
$formats = $form_state['values']['jst_timer_formats'];
foreach ($formats as $i => $format) {
if ($format == '') {
unset($formats[$i]);
}
}
$formats = array_values($formats);
variable_set('jst_timer_formats', $formats);
unset($form_state['values']['jst_timer_formats']);
drupal_set_message(t('Remember to "reload" the page. Most browsers will cache the javascript file.'));
}