function collapsiblock_admin_settings in Collapsiblock 6
Same name and namespace in other branches
- 7.2 collapsiblock.module \collapsiblock_admin_settings()
- 7 collapsiblock.module \collapsiblock_admin_settings()
Admin settings.
1 string reference to 'collapsiblock_admin_settings'
- collapsiblock_menu in ./
collapsiblock.module - Implementation of hook_menu().
File
- ./
collapsiblock.module, line 35 - Make blocks collapsible.
Code
function collapsiblock_admin_settings() {
$form = array();
$form['collapsiblock_help'] = array(
'#type' => 'item',
'#value' => t('Change selectors from <a href="!url">Themes configuration</a>.', array(
'!url' => url('admin/build/themes/settings'),
)),
);
$form['collapsiblock_default_state'] = array(
'#type' => 'radios',
'#title' => t('Default block collapse behavior'),
'#options' => array(
1 => t('None.'),
2 => t('Collapsible, expanded by default.'),
3 => t('Collapsible, collapsed by default.'),
4 => t('Collapsible, collapsed all the time.'),
),
'#default_value' => variable_get('collapsiblock_default_state', 1),
);
$form['collapsiblock_slide_type'] = array(
'#type' => 'radios',
'#title' => t('Default animation type'),
'#options' => array(
1 => t('Slide'),
2 => t('Fade and slide'),
),
'#description' => t('Slide is the Drupal default while Fade and slide adds a nice fade effect.'),
'#default_value' => variable_get('collapsiblock_slide_type', 1),
);
$form['collapsiblock_slide_speed'] = array(
'#type' => 'select',
'#title' => t('Animation speed'),
'#options' => drupal_map_assoc(array(
'50',
'100',
'200',
'300',
'400',
'500',
'700',
'1000',
'1300',
)),
'#description' => t('The animation speed in milliseconds.'),
'#default_value' => variable_get('collapsiblock_slide_speed', 200),
);
$form = system_settings_form($form);
return $form;
}