You are here

function _htmlpurifier_config_reset in HTML Purifier 7.2

Validation function for the reset button.

Setting the $form_state['rebuild'] value to TRUE says that we're going to rebuild the form. We also add a reset value to $form_state

1 string reference to '_htmlpurifier_config_reset'
_htmlpurifier_settings in ./htmlpurifier.module
Generates a settings form for configuring HTML Purifier.

File

./htmlpurifier.module, line 739
Implements HTML Purifier as a Drupal filter.

Code

function _htmlpurifier_config_reset($form, &$form_state) {
  drupal_set_message(t('The %format configuration has been reset to defaults.  Settings must still be saved.', array(
    '%format' => 'HTML Purifier',
  )));
  $form_state['rebuild'] = TRUE;
  $form_state['htmlpurifier']['htmlpurifier_config_reset'] = TRUE;
}