function domain_settings_domainform in Domain Access 6.2
Same name and namespace in other branches
- 7.2 domain_settings/domain_settings.module \domain_settings_domainform()
Implements hook_domainform().
File
- domain_settings/
domain_settings.module, line 203 - Allows domain-specific use of Drupal system settings forms.
Code
function domain_settings_domainform(&$form) {
// Add the form element to the main screen.
$form['domain_settings_module'] = array(
'#type' => 'fieldset',
'#title' => t('Domain-specific settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['domain_settings_module']['domain_settings_behavior'] = array(
'#type' => 'radios',
'#title' => t('Domain settings behavior'),
'#options' => array(
0 => t('Use the default domain'),
1 => t('Use the active domain'),
2 => t('All domains'),
),
'#default_value' => variable_get('domain_settings_behavior', 0),
'#description' => t('Default form value when submitting system settings.'),
);
$form['domain_settings_module']['domain_settings_form_visibility'] = array(
'#type' => 'radios',
'#title' => t('Visibility of domain-specific settings on forms'),
'#options' => array(
DOMAIN_SETTINGS_SHOW_EXCEPT_LISTED => t('Show on every system settings form, except those listed below.'),
DOMAIN_SETTINGS_SHOW_ONLY_LISTED => t('Show only on system settings forms listed below.'),
),
'#default_value' => variable_get('domain_settings_form_visibility', DOMAIN_SETTINGS_SHOW_EXCEPT_LISTED),
);
$form['domain_settings_module']['domain_settings_forms'] = array(
'#type' => 'textarea',
'#title' => t('Forms'),
'#rows' => 5,
'#cols' => 40,
'#default_value' => variable_get('domain_settings_forms', ''),
'#description' => t('Allow or disallow specific forms by entering a list of form_ids, one per line.'),
);
}