function modr8_filter_form in modr8 7
Content moderation filter form.
2 string references to 'modr8_filter_form'
- modr8_form_alter in ./
modr8.module - Implements hook_form_alter()
- modr8_page in ./
modr8_admin.inc - Menu callback; displays the content moderation form.
File
- ./
modr8_admin.inc, line 401 - Admin pages for moderation
Code
function modr8_filter_form($form, $form_state) {
$form['#method'] = 'get';
$form['filters'] = array(
'#type' => 'fieldset',
'#title' => t('Show only items where'),
'#theme' => 'exposed_filters__node',
);
$options = array(
'[any]' => 'Any',
) + get_modr8_node_types();
$form['filters']['modr8_content_type'] = array(
'#type' => 'select',
'#title' => t('type'),
'#default_value' => isset($_GET['modr8_content_type']) ? $_GET['modr8_content_type'] : '[any]',
'#options' => $options,
);
$form['filters']['modr8_content_author'] = array(
'#type' => 'textfield',
'#title' => t('user'),
'#default_value' => isset($_GET['modr8_content_author']) ? $_GET['modr8_content_author'] : '',
'#autocomplete_path' => 'user/autocomplete',
'#size' => 25,
'#maxlength' => 60,
);
$form['filters']['actions'] = array(
'#type' => 'actions',
'#attributes' => array(
'class' => array(
'container-inline',
),
),
);
$form['filters']['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Filter'),
);
if (isset($_GET['modr8_content_type']) || isset($_GET['modr8_content_author'])) {
$form['filters']['actions']['reset'] = array(
'#markup' => l(t('Reset'), 'admin/content/modr8'),
);
}
$form['#token'] = FALSE;
return $form;
}