function global_filter_date_combo_process_alter in Views Global Filter 8
Same name and namespace in other branches
- 7 widgets/global_filter.datewidget.inc \global_filter_date_combo_process_alter()
Implements hook_date_combo_process_alter().
Remove the 'Show End Date' checkbox and line up the start and end date boxes.
File
- widgets/
global_filter.datewidget.inc, line 35 - global_filter.datewidget.inc
Code
function global_filter_date_combo_process_alter(&$element, &$form_state, &$context) {
if (!empty($context['form']['#id']) && strpos($context['form']['#id'], 'global-filter') === 0) {
// Remove 'Show End Date' checkbox.
unset($element['show_todate']);
if (empty($element['value']['#title'])) {
// Remove 'to:' from end box so it lines up vertically with start box.
unset($element['value2']['#title']);
}
}
}