function scheduler_admin in Scheduler 6
Same name and namespace in other branches
- 5 scheduler.module \scheduler_admin()
- 7 scheduler.admin.inc \scheduler_admin()
1 string reference to 'scheduler_admin'
- scheduler_menu in ./
scheduler.module - Implementation of hook_menu().
File
- ./
scheduler.module, line 124
Code
function scheduler_admin() {
$form['scheduler_date_format'] = array(
'#type' => 'textfield',
'#title' => t('Date format'),
'#default_value' => variable_get('scheduler_date_format', SCHEDULER_DATE_FORMAT),
'#size' => 20,
'#maxlength' => 20,
'#description' => t('The input format for the (un)scheduling time/date. See the date() function for formatting options: http://www.php.net/manual/en/function.date.php (only the following format characters are supported (don\'t use \'G\', \'a\' or \'A\' with Date Popup): djmnyYhHgGisaA)'),
);
$form['scheduler_field_type'] = array(
'#type' => 'radios',
'#title' => t('Field type'),
'#default_value' => variable_get('scheduler_field_type', 'date_popup'),
'#options' => array(
'textfield' => t('Standard text field'),
'date_popup' => t('Date Popup field'),
),
'#description' => t("If the Date module's Date Popup module is enabled you may use the popup calendar for your field type."),
);
if (!module_exists('date_popup')) {
$form['scheduler_field_type']['#default_value'] = 'textfield';
$form['scheduler_field_type']['#disabled'] = TRUE;
}
else {
$acceptable = implode(date_popup_time_formats(), ', ');
$form['scheduler_date_format']['#description'] .= t('If you are using Date Popup, the following time formats are supported: !formats', array(
'!formats' => $acceptable,
));
}
$form['scheduler_extra_info'] = array(
'#type' => 'textarea',
'#title' => t('Extra Info'),
'#default_value' => variable_get('scheduler_extra_info', ''),
'#description' => t('The text entered into this field will be displayed above the scheduling fields in the node edit form.'),
);
return system_settings_form($form);
}