You are here

function domain_settings_reset_form_submit in Domain Access 7.3

Same name and namespace in other branches
  1. 6.2 domain_settings/domain_settings.module \domain_settings_reset_form_submit()
  2. 7.2 domain_settings/domain_settings.module \domain_settings_reset_form_submit()

Form submit handler to batch reset custom settings.

See also

domain_conf_reset_form()

1 string reference to 'domain_settings_reset_form_submit'
domain_settings_form_domain_conf_reset_form_alter in domain_settings/domain_settings.module
Handle the erasure of Domain Conf settings properly.

File

domain_settings/domain_settings.module, line 311
Allows domain-specific use of Drupal system settings forms.

Code

function domain_settings_reset_form_submit($form, &$form_state) {
  if (empty($form_state['values']['domain_settings_erase'])) {
    domain_conf_reset_form_submit($form, $form_state);
    return;
  }
  drupal_set_message(t('Domain configuration settings have been reset. Custom module settings have been retained.'));
  $form_state['redirect'] = 'admin/structure/domain/conf/' . $form_state['values']['domain_id'];
  domain_settings_reset($form_state['values']['domain_id']);

  // Clear the cache.
  cache_clear_all();
}