function superfish_system_settings_form in Superfish 7
Same name and namespace in other branches
- 6 superfish.admin.inc \superfish_system_settings_form()
Overriding system settings form.
1 call to superfish_system_settings_form()
- superfish_admin_settings in ./
superfish.admin.inc - Module settings form.
File
- ./
superfish.admin.inc, line 11 - Functions that are only called on the admin pages.
Code
function superfish_system_settings_form($form, $automatic_defaults = TRUE) {
$form['actions']['#type'] = 'container';
$form['actions']['#attributes']['class'][] = 'form-actions';
$form['actions']['#weight'] = 100;
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
if ($automatic_defaults) {
$form = _system_settings_form_automatic_defaults($form);
}
if (!empty($_POST) && form_get_errors()) {
drupal_set_message(t('The settings have not been saved because of the errors.'), 'error');
}
// Adding our custom submission handler.
$form['#submit'][] = 'superfish_admin_settings_submit';
$form['#submit'][] = 'system_settings_form_submit';
// By default, render the form using theme_system_settings_form().
if (!isset($form['#theme'])) {
$form['#theme'] = 'system_settings_form';
}
return $form;
}