You are here

function system_settings_form in Drupal 5

Same name and namespace in other branches
  1. 4 modules/system.module \system_settings_form()
  2. 6 modules/system/system.module \system_settings_form()
  3. 7 modules/system/system.module \system_settings_form()

Add default buttons to a form and set its prefix

26 calls to system_settings_form()
aggregator_admin_settings in modules/aggregator/aggregator.module
blogapi_admin_settings in modules/blogapi/blogapi.module
comment_admin_settings in modules/comment/comment.module
Menu callback; presents the comment settings page.
contact_admin_settings in modules/contact/contact.module
drupal_distributed_authentication_settings in modules/drupal/drupal.module

... See full list

File

modules/system/system.module, line 1075
Configuration system that lets administrators modify the workings of the site.

Code

function system_settings_form($form) {
  $form['buttons']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save configuration'),
  );
  $form['buttons']['reset'] = array(
    '#type' => 'submit',
    '#value' => t('Reset to defaults'),
  );
  if (!empty($_POST) && form_get_errors()) {
    drupal_set_message(t('The settings have not been saved because of the errors.'), 'error');
  }
  $form['#base'] = 'system_settings_form';
  return $form;
}