function composite_views_filter_handler::options_form in Composite Views Filter 7
Define options form.
Overrides views_handler_filter::options_form
File
- views/
composite_views_filter_handler.inc, line 31
Class
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// No multiple!
if (isset($form['expose']['multiple'])) {
$form['expose']['multiple']['#access'] = FALSE;
$form['expose']['multiple']['#default_value'] = 0;
}
// @see _composite_views_filter_groups()
$form['expose']['label']['#required'] = TRUE;
$form['composite_views_filter'] = array(
'#type' => 'fieldset',
'#title' => t('Groups'),
'#tree' => TRUE,
'#collapsed' => FALSE,
'#collapsible' => FALSE,
);
$form['composite_views_filter']['groups'] = array(
'#type' => 'textarea',
'#title' => t('Groups'),
'#default_value' => $this->options['composite_views_filter']['groups'],
'#required' => TRUE,
'#description' => t('Define groups like you would options in a List Field: <code>key|Readable label</code>. Labels will be translated.'),
);
$form['composite_views_filter']['default_group'] = array(
'#type' => 'textfield',
'#title' => t('Default selected composite filter'),
'#default_value' => $this->options['composite_views_filter']['default_group'],
'#description' => t('Machine name of one of the above groups. Leave this empty to disable all composite filters initially.'),
);
$form['composite_views_filter']['all_label'] = array(
'#type' => 'textfield',
'#title' => t('Label for "- All -"'),
'#default_value' => $this->options['composite_views_filter']['all_label'],
'#description' => t('The dropdown label that represents all filter groups. If empty, "- All -" will be used. This string will be translated.'),
);
}