event_all_day.module in Event 5.2
File
contrib/event_all_day/event_all_day.module
View source
<?php
function event_all_day_help($section) {
switch ($section) {
case 'admin/modules#description':
return 'All day events';
}
}
function event_all_day_form_alter($form_id, &$form) {
$type = isset($form['type']) && isset($form['type']['#value']) ? $form['type']['#value'] : NULL;
if ($form_id == $type . '_node_form' && variable_get('event_nodeapi_' . $type, 'never') != 'never') {
$form['start_minute_all_day'] = array(
'#type' => 'checkbox',
'#title' => t('All day'),
'#default_value' => 0,
'#weight' => -14,
);
$path = drupal_get_path('module', 'event_all_day');
drupal_add_js($path . '/event_all_day.js');
}
}