You are here

function styleswitcher_config_theme_validate in Style Switcher 7.2

Same name and namespace in other branches
  1. 6.2 styleswitcher.admin.inc \styleswitcher_config_theme_validate()

Form validation handler for styleswitcher_config_theme().

See also

styleswitcher_config_theme_submit()

File

./styleswitcher.admin.inc, line 145
Styleswitcher configuration functionality.

Code

function styleswitcher_config_theme_validate($form, &$form_state) {
  $theme = $form_state['values']['theme_name'];
  $values = $form_state['values']['settings'];

  // Automatically enable the default style and the style which was default
  // previously because we will not get the value from that disabled checkbox.
  $values['enabled'][$values['default']] = 1;
  $values['enabled'][styleswitcher_default_style_key($theme)] = 1;
  form_set_value($form['settings'], $values, $form_state);
}