function date_popup_settings in Date 7
Same name and namespace in other branches
- 6.2 date_popup/date_popup.module \date_popup_settings()
- 7.3 date_popup/date_popup.module \date_popup_settings()
- 7.2 date_popup/date_popup.module \date_popup_settings()
General configuration form for controlling the Date Popup behaviour.
1 string reference to 'date_popup_settings'
- date_popup_menu in date_popup/
date_popup.module - Implement hook_menu().
File
- date_popup/
date_popup.module, line 575 - A module to enable jquery calendar and time entry popups. Requires the Date API.
Code
function date_popup_settings() {
$form['#prefix'] = t('<p>The Date Popup module uses a jQuery timepicker module. There is no "official" jQuery UI timepicker, and not everyone likes the one that is included here. If you do not want to use the timepicker, you can turn it off below and users will get a regular textfield instead.</p>');
$form['date_popup_timepicker'] = array(
'#type' => 'select',
'#options' => array(
'default' => t('Use default jQuery timepicker'),
'none' => t('Manual time entry, no jQuery timepicker'),
),
'#title' => t('Timepicker'),
'#default_value' => variable_get('date_popup_timepicker', 'default'),
'#description' => t("Choose the jQuery timepicker to user."),
);
$css = <<<EOM
/* ___________ IE6 IFRAME FIX ________ */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/ /* LTR */
width: 200px; /*must have*/
height: 200px; /*must have*/
}
EOM;
$form['#suffix'] = t('<p>The Date Popup calendar includes some css for IE6 that breaks css validation. Since IE 6 is now superceded by IE 7 and IE 8, the special css for IE 6 has been removed from the regular css used by the Date Popup. If you find you need that css after all, you can add it back in your theme. Look at the way the Garland theme adds special IE-only css in in its page.tpl.php file. The css you need is:</p>') . '<blockquote><PRE>' . $css . '</PRE></blockquote>';
return system_settings_form($form);
}