You are here

function panels_tabs_style_settings_form in Panels Tabs 5

Same name and namespace in other branches
  1. 6 plugins/styles/tabs.inc \panels_tabs_style_settings_form()

Settings form callback.

1 string reference to 'panels_tabs_style_settings_form'
panels_tabs_panels_styles in ./panels_tabs.module
Implementation of hook_panels_styles().

File

./panels_tabs.module, line 76
Definition of the 'tabs' panel style.

Code

function panels_tabs_style_settings_form($settings) {
  $form['filling_tabs'] = array(
    '#type' => 'radios',
    '#title' => t('Horizontally filling tabs'),
    '#options' => array(
      'disabled' => t('Disabled'),
      'equal' => t('Equal width tabs'),
      'smart' => t('Equal width scaling tabs'),
    ),
    '#description' => t("Horizontally filling tabs make sure the tabs consume all available\n      horizontal space.<br />\n      Equal width tabs: sets the <em>width</em> property, forcing each tab\n      to be equally wide. If the text doesn't fit in the tab, the overflow\n      will be hidden.<br />\n      Horizontally filling, smart width tabs: calculates the length of the\n      text in each tab and compares this to the total length of the text on\n      all tabs. It then sets the width property of each tab according to the\n      percentage of text the tab contains."),
    '#default_value' => isset($settings['filling_tabs']) ? $settings['filling_tabs'] : 'disabled',
  );
  return $form;
}