You are here

function quickbar_configure_form in Quickbar 6

Same name and namespace in other branches
  1. 7.2 quickbar.admin.inc \quickbar_configure_form()
  2. 7 quickbar.admin.inc \quickbar_configure_form()

Page to configure a toolbar

Configures the settings for a toolbar.

Return value

A form setting the settings for a toolbar.

2 string references to 'quickbar_configure_form'
quickbar_extras_form_alter in modules/quickbar_extras/quickbar_extras.module
Implements hook_form_alter().
_quickbar_configure_page in ./quickbar.admin.inc

File

./quickbar.admin.inc, line 154
Handles quickbar administration

Code

function quickbar_configure_form(&$form_state, $rid) {
  $form_state['rid'] = $rid;
  $iconset_info = module_invoke_all('quickbar_iconset_info');
  $iconsets = array();
  foreach ($iconset_info as $iconset_id => $iconset_data) {
    $iconsets[$iconset_id] = $iconset_data['title'];
  }
  $form['iconset'] = array(
    '#title' => 'Iconset',
    '#description' => 'Choose the iconset for the toolbar.',
    '#type' => 'select',
    '#default_value' => variable_get('quickbar_iconset_' . $rid, 'quickbar'),
    '#options' => $iconsets,
  );
  $form['sticky'] = array(
    '#title' => 'Make the toolbar sticky at the top',
    '#description' => 'If this is enabled the toolbar will always be visible as you scroll down.',
    '#type' => 'checkbox',
    '#default_value' => variable_get('quickbar_sticky_' . $rid, FALSE),
  );
  $form['nofollow'] = array(
    '#title' => 'Do not follow top-level links',
    '#description' => 'If this is enabled the top-level links of toolbar will only open secondary menus.',
    '#type' => 'checkbox',
    '#default_value' => variable_get('quickbar_nofollow_' . $rid, FALSE),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}