function popup_description_admin_settings in Popup 7
Same name and namespace in other branches
- 8 modules/popup_descriptions/includes/popup_descriptions.admin.inc \popup_description_admin_settings()
- 7.x modules/popup_descriptions/includes/popup_descriptions.admin.inc \popup_description_admin_settings()
Administration settings form
1 string reference to 'popup_description_admin_settings'
- popup_descriptions_menu in modules/
popup_descriptions/ popup_descriptions.module - Implementation of hook_menu
File
- modules/
popup_descriptions/ includes/ popup_descriptions.admin.inc, line 8
Code
function popup_description_admin_settings() {
module_load_include('inc', 'popup_ui', 'includes/popup_ui.admin');
$format_options = array_keys(_popup_ui_formatter_settings());
array_unshift($format_options, 'Default');
$display_format_options = array_combine($format_options, $format_options);
$form = array(
'description-popup-admin' => array(
'#default_value' => variable_get('description-popup-admin', TRUE),
'#title' => t('Enable administration links in form element descriptions'),
'#type' => 'checkbox',
),
'display' => array(
'#type' => 'fieldset',
'#title' => t('Display'),
'description-popup-title' => array(
'#default_value' => variable_get('description-popup-title', '?'),
'#description' => t('The title that will be displayed in stead of the description. eg. "?"'),
'#title' => t('Popup title'),
'#type' => 'textfield',
),
'description-popup-format' => array(
'#default_value' => variable_get('description-popup-format'),
'#description' => t('Select the format in which to display popups. You may manage popup formats !here.', array(
'!here' => l('here', 'admin/config/user-interface/popup/formats'),
)),
'#title' => t('Display format'),
'#type' => 'select',
'#options' => $display_format_options,
),
'description-popup-position' => array(
'#default_value' => variable_get('description-popup-position'),
'#description' => t('Select where the popup icon should be displayed.'),
'#title' => t('Position'),
'#type' => 'select',
'#options' => array(
t('Default (In the discription area)'),
'label' => t('Label'),
'prefix' => t('Prefix'),
'suffix' => t('Suffix'),
),
),
),
'selection' => array(
'#type' => 'fieldset',
'#title' => t('Selection'),
'description-popup-mode' => array(
'#default_value' => variable_get('description-popup-mode', 'specific'),
'#options' => array(
t('No fields'),
'all' => t('All fields'),
'specific' => t('Specific fields'),
),
'#title' => t('Popup the descriptions of:'),
'#type' => 'radios',
),
'description-popup-id' => array(
'#default_value' => variable_get('description-popup-id'),
'#title' => t('Popup descriptions of fields with the following IDs:'),
'#type' => 'checkbox',
),
'description-popup-ids' => array(
'#default_value' => variable_get('description-popup-ids'),
'#description' => t('Enter one element id per line.<br /><em>These values will only have an effect if the "Specific fields" option is selected above.</em>'),
'#type' => 'textarea',
'#rows' => 10,
),
'description-popup-path' => array(
'#default_value' => variable_get('description-popup-path'),
'#title' => t('Popup all field descriptions on the following pages:'),
'#type' => 'checkbox',
),
'description-popup-paths' => array(
'#default_value' => variable_get('description-popup-paths'),
'#description' => t('Enter one internal drupal path per line.<br /><em>These values will only take effect if the "Specific fields" option is selected above.</em>'),
'#type' => 'textarea',
'#rows' => 10,
),
),
);
return system_settings_form($form);
}