You are here

function panels_tabs_pane_settings_form in Panels Tabs 7.2

Settings form for the plugin.

1 string reference to 'panels_tabs_pane_settings_form'
tabs.inc in plugins/styles/tabs.inc
Definition of the 'Tabs' panel style.

File

plugins/styles/tabs.inc, line 113
Definition of the 'Tabs' panel style.

Code

function panels_tabs_pane_settings_form($style_settings) {
  $form = array();
  $form['region_title'] = array(
    '#type' => 'textfield',
    '#title' => t('Title'),
    '#description' => t('Optional title of the region.'),
    '#required' => FALSE,
    '#default_value' => isset($style_settings['region_title']) ? $style_settings['region_title'] : '',
  );
  $form['region_title_tag'] = array(
    '#title' => t('Title tag'),
    '#type' => 'select',
    '#options' => array(
      'none' => t('- No tag -'),
      'h1' => t('h1'),
      'h2' => t('h2'),
      'h3' => t('h3'),
      'h4' => t('h4'),
      'h5' => t('h5'),
      'h6' => t('h6'),
      'div' => t('div'),
    ),
    '#default_value' => empty($style_settings['region_title_tag']) ? 'none' : $style_settings['region_title_tag'],
  );
  $form['region_class'] = array(
    '#title' => t('Region CSS class'),
    '#description' => t('Additional CSS class of the region.'),
    '#type' => 'textfield',
    '#default_value' => empty($style_settings['region_class']) ? '' : $style_settings['region_class'],
  );
  $form['panel_tab_id_pattern'] = array(
    '#type' => 'radios',
    '#title' => t("Tab ID pattern"),
    '#decsription' => t("Method to generate HTML id attribute for tabs."),
    '#default_value' => isset($style_settings['panel_tab_id_pattern']) ? $style_settings['panel_tab_id_pattern'] : 'region',
    '#options' => array(
      'region' => t('Fixed, based on region id (select this when panel region can be placed on the page only once)'),
      'random' => t('Generate random id (select this when panel region can be placed on the page multiple times)'),
    ),
  );
  return $form;
}