function admin_groups_list_filter_form

6.x admin.groups.inc admin_groups_list_filter_form()

File

modules/admin/admin.groups.inc, line 1540

Code

function admin_groups_list_filter_form() {

  $form = array();


  $form ['mark_top'] = array(
    'type' => 'markup',
    'value' => "<strong>" . t('Filter by...') . "</strong>",
    'weight' => 0,
  );


  $filter_name_value = trim($_SESSION ['groups_filter_name']);
  $form ['filter_name'] = array(
    'type' => 'textfield',
    'label' => '',
    'value' => $filter_name_value,
    'attributes' => array("placeholder" => t("Enter any title or name")),
    '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 ['groups_filter_school']);
    $options = schools_get_schools_for_fapi(TRUE, TRUE, 'group', 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;
}