function quickbar_configure_form in Quickbar 7
Same name and namespace in other branches
- 6 quickbar.admin.inc \quickbar_configure_form()
- 7.2 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.
1 string reference to 'quickbar_configure_form'
File
- ./
quickbar.admin.inc, line 226 - Handles quickbar administration
Code
function quickbar_configure_form($form_state, $info) {
$iconset_info = module_invoke_all('quickbar_iconset_info');
$iconsets = array();
foreach ($iconset_info as $iconset_id => $iconset_data) {
$iconsets[$iconset_id] = $iconset_data['title'];
}
$settings = variable_get('quickbar_settings_' . arg(4), _quickbar_default_settings());
$form = array(
'settings' => array(
'#type' => 'fieldset',
'#title' => t('General Settings'),
'iconset' => array(
'#type' => 'select',
'#title' => 'Iconset',
'#description' => 'Choose the iconset for the toolbar.',
'#default_value' => $settings['iconset'],
'#options' => $iconsets,
),
'sticky' => array(
'#type' => 'checkbox',
'#title' => 'Make the toolbar sticky at the top',
'#description' => 'If checked, the toolbar will always be visible as the user scrolls down the page.',
'#default_value' => $settings['sticky'],
),
'float' => array(
'#type' => 'checkbox',
'#title' => "Make the toolbar 'float' over page",
'#description' => 'If checked, the toolbar will overlay the top portion of the webpage.',
'#default_value' => $settings['float'],
'#states' => array(
'visible' => array(
':input#edit-settings-sticky' => array(
'checked' => FALSE,
),
),
),
),
'secondary_menu_visibility' => array(
'#type' => 'checkbox',
'#title' => 'Keep secondary menu open',
'#description' => 'If checked, the secondary menu will display on page load for relevant pages instead of being collapsed.',
'#default_value' => $settings['secondary_menu_visibility'],
),
'nofollow' => array(
'#title' => 'Do not follow top-level links',
'#description' => 'If enabled, top-level links of toolbar will only open secondary menus.',
'#type' => 'checkbox',
'#default_value' => $settings['nofollow'],
),
),
'submit' => array(
'#type' => 'submit',
'#value' => t('Save configuration'),
),
'#tree' => TRUE,
);
return $form;
}