You are here

function tabs_admin_settings in Javascript Tools 5

Menu callback for admin settings.

1 string reference to 'tabs_admin_settings'
tabs_menu in tabs/tabs.module
Implementation of hook_menu().

File

tabs/tabs.module, line 31
API for creating tabbed pages.

Code

function tabs_admin_settings() {
  $form = array();
  $form['jstools_history_remote'] = array(
    '#type' => 'radios',
    '#title' => t('History plugin'),
    '#description' => t('Load the history-remote plugin, which ties tab switching to browser back and forward buttons. The plugin can cause errors in combination with certain other Javascript functionality. Disable to avoid such errors. Note that disabling this setting will affect other modules if you use them: Active Search and Dynamicload.'),
    '#default_value' => variable_get('jstools_history_remote', 0),
    '#options' => array(
      t('disabled'),
      t('enabled'),
    ),
  );
  $form['tabs_slide'] = array(
    '#type' => 'radios',
    '#title' => t('Slide effect'),
    '#description' => t('Apply slide effect when changing tabs.'),
    '#default_value' => variable_get('tabs_slide', 0),
    '#options' => array(
      t('disabled'),
      t('enabled'),
    ),
  );
  $form['tabs_fade'] = array(
    '#type' => 'radios',
    '#title' => t('Fade effect'),
    '#description' => t('Apply fade effect when changing tabs.'),
    '#default_value' => variable_get('tabs_fade', 0),
    '#options' => array(
      t('disabled'),
      t('enabled'),
    ),
  );
  $form['tabs_speed'] = array(
    '#type' => 'radios',
    '#title' => t('Effect speed'),
    '#description' => t('Speed at which to apply effects.'),
    '#default_value' => variable_get('tabs_speed', 'slow'),
    '#options' => array(
      'slow' => t('slow'),
      'fast' => t('fast'),
    ),
  );
  $form['tabs_auto_height'] = array(
    '#type' => 'radios',
    '#title' => t('Fixed height'),
    '#description' => t('Set all tabs to have the height of the tallest tab. If not enabled, content will adjust to fit when tabs are changed. Note: fixed height is not fully compatible with slide and fade effects.'),
    '#default_value' => variable_get('tabs_auto_height', 0),
    '#options' => array(
      t('disabled'),
      t('enabled'),
    ),
  );
  $form['tabs_navigation'] = array(
    '#type' => 'radios',
    '#title' => t('Navigation buttons'),
    '#description' => t('Enable to add "next" and "previous" buttons to the bottom of all tab sets.'),
    '#default_value' => variable_get('tabs_navigation', 0),
    '#options' => array(
      t('disabled'),
      t('enabled'),
    ),
  );
  $form['tabs_nav_next'] = array(
    '#type' => 'textfield',
    '#title' => t('Next button caption'),
    '#description' => t('The text to be displayed in the \'next\' button.'),
    '#default_value' => variable_get('tabs_nav_next', t('next')),
  );
  $form['tabs_nav_prev'] = array(
    '#type' => 'textfield',
    '#title' => t('Previous button caption'),
    '#description' => t('The text to be displayed in the \'previous\' button.'),
    '#default_value' => variable_get('tabs_nav_prev', t('previous')),
  );
  $form = system_settings_form($form);
  return $form;
}