function _jquery_countdown_settings_form in jQuery Countdown 6
2 calls to _jquery_countdown_settings_form()
- jquery_countdown_date_widget_settings_alter in jquery_countdown_date/
jquery_countdown_date.module - @file provides a jquery.countdown formatter for "date" field and settings in the date widget
- _jquery_countdown_block_block_configure in jquery_countdown_block/
jquery_countdown_block.admin.inc - Returns the 'configure' $op info for hook_block().
File
- ./
jquery_countdown.module, line 226 - provides the jquery_countdown theme function and serversync callback
Code
function _jquery_countdown_settings_form($options = array()) {
$form = array();
$form['jquery_countdown'] = array(
'#type' => 'fieldset',
'#title' => t('jQuery countdown settings'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#tree' => TRUE,
);
$default_value = isset($options['admin_title']) ? $options['admin_title'] : NULL;
$form['jquery_countdown']['admin_title'] = array(
'#type' => 'textfield',
'#default_value' => $default_value,
'#title' => t('Administrative title'),
'#description' => t('This title will be used administratively to identify this block. If blank, a default title will be used.'),
);
$default_value = isset($options['date']) ? $options['date'] : NULL;
$datetype = module_exists('date_popup') ? 'date_popup' : 'date_select';
$form['jquery_countdown']['date'] = array(
'#type' => $datetype,
'#title' => t('Countdown date'),
'#required' => TRUE,
'#default_value' => $default_value,
'#date_format' => 'Y-m-d g:i a',
);
$default_value = isset($options['until']) ? $options['until'] : 'until';
$form['jquery_countdown']['until'] = array(
'#type' => 'radios',
'#title' => t('Counter type'),
'#required' => TRUE,
'#options' => array(
'until' => 'Count down to date',
'since' => 'Count up since date',
),
'#default_value' => $default_value,
'#description' => t('Whether the counter should count down to a date in the future or up from a date in the past.'),
);
$default_value = isset($options['serversync']) ? $options['serversync'] : TRUE;
$form['jquery_countdown']['serversync'] = array(
'#type' => 'checkbox',
'#title' => t('use servertime'),
'#description' => t('if checked the countdown uses the servertime instead of the client time as base time'),
'#default_value' => $default_value,
);
$default_value = isset($options['format']) ? $options['format'] : array(
'D',
'H',
'M',
'S',
);
$form['jquery_countdown']['format'] = array(
'#type' => 'select',
'#title' => t('Granularity'),
'#required' => TRUE,
'#multiple' => TRUE,
'#options' => array(
'Y' => 'Years',
'O' => 'Months',
'W' => 'Weeks',
'D' => 'Days',
'H' => 'Hours',
'M' => 'Minutes',
'S' => 'Seconds',
),
'#default_value' => $default_value,
'#description' => t('Which elements of the time to show. Default value is Days, Hours, Minutes, and Seconds.'),
);
$default_value = isset($options['compact']) ? $options['compact'] : FALSE;
$form['jquery_countdown']['compact'] = array(
'#type' => 'checkbox',
'#title' => t('use compact mode'),
'#description' => t('the compact mode remove the full labels'),
'#default_value' => $default_value,
);
$default_value = isset($options['layout']) ? $options['layout'] : FALSE;
$form['jquery_countdown']['layout'] = array(
'#type' => 'checkbox',
'#title' => t('use layout template file'),
'#description' => t('if enabled you can use a template file for the layout'),
'#default_value' => $default_value,
);
$default_value = isset($options['caption']) ? $options['caption'] : NULL;
$form['jquery_countdown']['caption'] = array(
'#type' => 'textarea',
'#title' => t('Counter description'),
'#default_value' => $default_value,
'#description' => t('This text is shown beneath the counter.'),
);
return $form;
}