1 redirect.admin.inc redirect_list_404_filter_form($form, &$form_state, $filter_value = '')

Return a form to filter URL redirects.

Parameters

string $filter_value: The current string by which the list of 404s will be filtered.

See also

redirect_list_filter_form_submit()

Related topics

File

core/modules/redirect/redirect.admin.inc, line 783
Administrative page callbacks for the Redirect module.

Code

function redirect_list_404_filter_form($form, &$form_state, $filter_value = '') {
  $form['#attributes'] = array('class' => array('search-form'));
  $form['help'] = array(
    '#type' => 'help',
    '#markup' => t('This page lists all paths that have resulted in 404 errors and do not yet have any redirects assigned to them.'),
  );
  $form['basic'] = array(
    '#type' => 'fieldset',
    '#title' => t('Filter 404s'),
    '#attributes' => array('class' => array('container-inline')),
  );
  $form['basic']['filter'] = array(
    '#type' => 'textfield',
    '#title' => '',
    '#default_value' => $filter_value,
    '#maxlength' => 128,
    '#size' => 25,
  );
  $form['basic']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Filter'),
    '#submit' => array('redirect_list_404_filter_form_submit'),
  );
  if ($filter_value) {
    $form['basic']['reset'] = array(
      '#type' => 'submit',
      '#value' => t('Reset'),
      '#submit' => array('redirect_list_404_filter_form_reset'),
    );
  }
  return $form;
}