You are here

function page_manager_http_response_edit_settings in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 page_manager/plugins/task_handlers/http_response.inc \page_manager_http_response_edit_settings()

General settings for the handler

1 string reference to 'page_manager_http_response_edit_settings'
http_response.inc in page_manager/plugins/task_handlers/http_response.inc
This is the task handler plugin to handle generating 403, 404 and 301 response codes.

File

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'],
    '#process' => array(
      'ctools_dependent_process',
    ),
    '#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).'),
  );
}