function admin_courses_list_filter_form
Search API
7.x admin.courses.inc | admin_courses_list_filter_form() |
6.x admin.courses.inc | admin_courses_list_filter_form() |
File
- modules/
admin/ admin.courses.inc, line 283
Code
function admin_courses_list_filter_form() {
$form = array();
$form ['mark_top'] = array(
'type' => 'markup',
'value' => "<strong>" . t('Filter by...') . "</strong>",
'weight' => 0,
);
$filter_exclude_value = @trim($_SESSION ['courses_filter_exclude']);
$form ['filter_exclude'] = array(
'type' => 'select',
'label' => '',
'options' => array('' => 'Hide excluded courses', 'yes' => 'Show excluded courses'),
'value' => $filter_exclude_value,
'hide_please_select' => TRUE,
'size' => 20,
'weight' => 10,
);
// If we have enabled the schools module, then have a selector for that as well
if (module_enabled('schools')) {
$filter_school_value = @intval($_SESSION ['courses_filter_school']);
$options = schools_get_schools_for_fapi(TRUE, TRUE, 'course', TRUE);
$options [0] = t('- All / Default -');
$form ['filter_school'] = array(
'type' => 'select',
'label' => t('School:'),
'options' => $options,
'value' => $filter_school_value,
'weight' => 20,
'hide_please_select' => TRUE,
);
} // if schools enabled
$form ['submit_btn'] = array(
'type' => 'submit',
'value' => t('Apply'),
'weight' => 100,
);
$form ['reset_btn'] = array(
'type' => 'submit',
'value' => t('Reset'),
'weight' => 110,
);
return $form;
}