page_manager_http_response_edit_settings

  1. drupal
    1. 6 http_response.inc function
    2. 7 http_response.inc function
Drupal 7 page_manager_http_response_edit_settings($form, &$form_state)

General settings for the panel

File

sites/all/modules/ctools/page_manager/plugins/task_handlers/http_response.inc, line 217
This is the task handler plugin to handle generating 403, 404 and 301 response codes.

Code

function page_manager_http_response_edit_settings($form, &$form_state) {
  $conf = $form_state['handler']->conf;
  $form['title'] = array(
    '#type' => 'textfield', 
    '#default_value' => $conf['title'], 
    '#title' => t('Administrative title'), 
    '#description' => t('Administrative title of this variant.'),
  );

  $form['code'] = array(
    '#title' => t('Response code'), 
    '#type' => 'select', 
    '#options' => page_manager_http_response_codes(), 
    '#default_value' => $conf['code'],
  );

  ctools_include('dependent');
  $form['destination'] = array(
    '#type' => 'textfield', 
    '#title' => t('Redirect destination'), 
    '#default_value' => $conf['destination'], 
    '#dependency' => array('edit-code' => array(301)), 
    '#description' => t('Enter the path to redirect to. You may use keyword substitutions from contexts. You can use external urls (http://www.example.com/foo) or internal urls (node/1).'),
  );

  return $form;
}