You are here

function hierarchical_select_admin_settings in Hierarchical Select 6.3

Same name and namespace in other branches
  1. 5.3 hierarchical_select.admin.inc \hierarchical_select_admin_settings()
  2. 5.2 hierarchical_select.module \hierarchical_select_admin_settings()
  3. 7.3 hierarchical_select.admin.inc \hierarchical_select_admin_settings()

Form definition; admin settings.

1 string reference to 'hierarchical_select_admin_settings'
hierarchical_select_menu in ./hierarchical_select.module
Implementation of hook_menu().

File

./hierarchical_select.admin.inc, line 13
Module settings and configuration administration UI.

Code

function hierarchical_select_admin_settings() {
  $form['description'] = array(
    '#value' => t('All settings below will be used as site-wide defaults.'),
    '#prefix' => '<div>',
    '#suffix' => '</div>',
  );
  $form['hierarchical_select_animation_delay'] = array(
    '#type' => 'textfield',
    '#title' => t('Animation delay'),
    '#description' => t('The delay that will be used for the "drop in/out" effect when a
      hierarchical select is being updated (in milliseconds).'),
    '#size' => 5,
    '#maxlength' => 5,
    '#default_value' => variable_get('hierarchical_select_animation_delay', 400),
  );
  $form['hierarchical_select_level_labels_style'] = array(
    '#type' => 'select',
    '#title' => t('Level labels style'),
    '#description' => t('The style that will be used for level labels. This is not supported by
      all browsers! If you want a consistent interface, choose to use no
      style.'),
    '#options' => array(
      'none' => t('No style'),
      'bold' => t('Bold'),
      'inversed' => t('Inversed'),
      'underlined' => t('Underlined'),
    ),
    '#default_value' => variable_get('hierarchical_select_level_labels_style', 'none'),
  );
  $form['hierarchical_select_js_cache_system'] = array(
    '#type' => 'radios',
    '#title' => t('Cache in a HTML 5 client-side database'),
    '#description' => t('This feature only works in browsers that support the
      <a href="!spec-url">HTML 5 client-side database storage specification
      </a>.</br>
      After enabling this, you will notice (in supporting browsers) that
      refreshing the hierarchical select will not require a request to the
      server when a part is being requested that has been requested before.', array(
      '!spec-url' => url('http://www.whatwg.org/specs/web-apps/current-work/multipage/section-sql.html'),
    )),
    '#options' => array(
      0 => t('Disabled'),
      1 => t('Enabled'),
    ),
    '#default_value' => variable_get('hierarchical_select_js_cache_system', 0),
  );
  return system_settings_form($form);
}