You are here

function views_content_exposed_form_pane_edit in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 views_content/views_content.module \views_content_exposed_form_pane_edit()

Add settings to the "exposed form in block" views.

1 string reference to 'views_content_exposed_form_pane_edit'
views_ctools_block_info in views_content/views_content.module
Don't show Views' blocks; we expose them already.

File

views_content/views_content.module, line 68
views_content.module

Code

function views_content_exposed_form_pane_edit(&$form, &$form_state) {

  // This is a cheesy way to add defaults only to new versions of the block
  // but leave older blocks without the setting alone. We can tell because
  // all older content will have something set for override_title which is
  // the only pre-existing setting.
  if (!isset($form_state['conf']['inherit_path']) && !isset($form_state['conf']['override_title'])) {
    $form_state['conf']['inherit_path'] = TRUE;
  }
  $form['inherit_path'] = array(
    '#type' => 'checkbox',
    '#title' => t('Inherit path'),
    '#default_value' => !empty($form_state['conf']['inherit_path']),
  );
}