function glossary_general_settings_form in Glossary 5
Same name and namespace in other branches
- 5.2 glossary.module \glossary_general_settings_form()
- 6 glossary.admin.inc \glossary_general_settings_form()
- 7 glossary.admin.inc \glossary_general_settings_form()
1 call to glossary_general_settings_form()
1 string reference to 'glossary_general_settings_form'
- glossary_menu in ./
glossary.module - Implementation of hook_menu().
File
- ./
glossary.module, line 863
Code
function glossary_general_settings_form() {
$form = array();
$form['general'] = array(
'#type' => 'fieldset',
'#title' => t('General settings'),
'#collapsible' => true,
'#collapsed' => false,
'#description' => $cache_msg,
);
$form['general']['glossary_disable_indicator'] = array(
'#type' => 'checkbox',
'#title' => t('Allow the user to disable glossary links.'),
'#default_value' => variable_get('glossary_disable_indicator', false),
'#description' => t('Determines whether or not the individual user may disable the Glossary indicators.'),
);
$form['general']['glossary_hide_menus'] = array(
'#type' => 'checkbox',
'#title' => t('Hide unused input format tabs.'),
'#default_value' => variable_get('glossary_hide_menus', false),
'#description' => t('Determines whether or not to hide settings tabs for input formats that are not glossary-enabled..'),
);
$form['general']['glossary_page'] = array(
'#type' => 'fieldset',
'#title' => t('Glossary Page'),
'#collapsible' => false,
'#collapsed' => false,
'#description' => $cache_msg,
);
// This next setting cannot vary by format since the glossary overview doesn't care or know about input formats
$form['general']['glossary_page']['glossary_page_per_letter'] = array(
'#type' => 'checkbox',
'#title' => t('Show glossary across many smaller pages.'),
'#default_value' => variable_get('glossary_page_per_letter', false),
'#description' => t('Do you want to show all terms on one glossary page or break up the glossary into a page for each first letter (i.e. many pages).'),
);
$form['general']['glossary_page']['glossary_allow_no_description'] = array(
'#type' => 'checkbox',
'#title' => t('Show glossary terms even if there is no description.'),
'#default_value' => variable_get('glossary_allow_no_description', false),
'#description' => t('By default, Glossary omits terms from the list if there is no term description. This setting overrides that. This is useful on free-tagging vocabularies that rarely get descriptions.'),
);
$form['general']['glossary_page']['glossary_show_description'] = array(
'#type' => 'checkbox',
'#title' => t('Show glossary term descriptions on the Glossary page.'),
'#default_value' => variable_get('glossary_show_description', false),
'#description' => t('Glossary term descriptions may be large and/or include pictures, therefore the Glossary page can take a long time to load if you include the full descriptions.'),
);
$form['general']['glossary_page']['glossary_separate_letters'] = array(
'#type' => 'checkbox',
'#title' => t('Separate letters.'),
'#default_value' => variable_get('glossary_separate_letters', false),
'#description' => t('Separate the terms by the first letters. This will create a large letter at the beginning of each section.'),
);
$click_options = array(
t('Show only the single term.'),
t('Advance the whole glossary to the term.'),
);
$form['general']['glossary_click_option'] = array(
'#type' => 'radios',
'#title' => t('Clicking on a term link will'),
'#options' => $click_options,
'#default_value' => variable_get("glossary_click_option", 0),
'#description' => t('Changing this setting may require you to clear the cache_filter.'),
'#prefix' => '<div class="glossary_radios">',
'#suffix' => '</div>',
);
return system_settings_form($form);
}