function global_filter_admin_config in Views Global Filter 6
Same name and namespace in other branches
- 8 global_filter.admin.inc \global_filter_admin_config()
- 7 global_filter.admin.inc \global_filter_admin_config()
Menu callback for admin settings.
1 string reference to 'global_filter_admin_config'
- global_filter_menu in ./
global_filter.module - Implements hook_menu().
File
- ./
global_filter.module, line 32 - global_filter.module
Code
function global_filter_admin_config() {
$form['global_filter_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Global Filter module configuration'),
'#description' => '',
);
$form['global_filter_settings']['global_filter_num_filters'] = array(
'#type' => 'textfield',
'#size' => 2,
'#title' => t('Maximum number of global filter blocks you may need'),
'#default_value' => variable_get('global_filter_num_filters', GLOBAL_FILTER_DEF_NUM_FILTERS),
'#description' => t('Determines how many global filter blocks will be available for you to use at <a href="@url">Administer >> Site building >> Blocks</a>.<br/>You may increase or decrease this number at any time.', array(
'@url' => url('admin/build/block'),
)),
);
$form['global_filter_settings']['global_filter_set_on_select'] = array(
'#type' => 'checkbox',
'#title' => t('Invoke drop-down filter immediately upon select.'),
'#default_value' => variable_get('global_filter_set_on_select', FALSE),
'#description' => t('When ticked this does away with the Set button next to the drop-down.'),
);
$form['global_filter_settings_advanced'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('Global Filter advanced options'),
'#description' => '',
);
$options = array_merge(array(
'' => t('None'),
), global_filter_get_view_names());
$form['global_filter_settings_advanced'] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#title' => t('Global Filter advanced configuration'),
'#description' => '',
);
$form['global_filter_settings_advanced']['global_filter_view_autocycle'] = array(
'#type' => 'select',
'#title' => t('Auto-cycle filter: select a view for supplying a next global filter value each time the filter is required'),
'#default_value' => variable_get('global_filter_view_autocycle', ''),
'#options' => $options,
'#description' => t('This global filter does not have any UI associated with it, as it does not need a user to select a value.'),
);
$form['global_filter_settings_advanced']['global_filter_view_autocycle_every_click'] = array(
'#type' => 'radios',
'#title' => t('The auto-cycle filter selected above is to supply its next value'),
'#options' => array(
FALSE => t('only when the Global Filter API is called explicitly'),
TRUE => t('on every page load'),
),
'#default_value' => variable_get('global_filter_view_autocycle_every_click', FALSE),
);
return system_settings_form($form);
}