You are here

function clientside_validation_settings_confirmation_form_submit in Clientside Validation 7.2

Same name and namespace in other branches
  1. 7 clientside_validation.admin.inc \clientside_validation_settings_confirmation_form_submit()

File

./clientside_validation.admin.inc, line 747
Admin settings for Clientside Validation

Code

function clientside_validation_settings_confirmation_form_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    $action = $form['#cvs_action'];
    $cvs_type = $form['#cvs_type'];
    $cvs_formid = $form['#cvs_formid'];
    switch ($action) {
      case 'delete':
        clientside_validation_settings_delete($cvs_type, $cvs_formid);
        break;
      case 'enable':
        clientside_validation_settings_enable($cvs_type, $cvs_formid);
        break;
      case 'disable':
        clientside_validation_settings_disable($cvs_type, $cvs_formid);
        break;
    }
    $form_state['redirect'] = 'admin/config/validation/clientside_validation/' . $cvs_type;
  }
}