You are here

function clientside_validation_settings_confirmation_form in Clientside Validation 7.2

Same name and namespace in other branches
  1. 7 clientside_validation.admin.inc \clientside_validation_settings_confirmation_form()
1 string reference to 'clientside_validation_settings_confirmation_form'
clientside_validation_menu in ./clientside_validation.module
Implements hook_menu().

File

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

Code

function clientside_validation_settings_confirmation_form($form, &$form_state, $cvs_formid, $cvs_type, $action) {
  $form['#cvs_action'] = $action;
  $form['#cvs_type'] = $cvs_type;
  $form['#cvs_formid'] = $cvs_formid;
  switch ($action) {
    case 'delete':
      $question = 'Are you sure you want to delete these settings';
      $info = 'This action cannot be undone.';
      break;
    case 'enable':
      $question = 'Are you sure you want to enable these settings';
      $info = 'You can always disable it later.';
      break;
    case 'disable':
      $question = 'Are you sure you want to disable these settings';
      $info = 'You can always enable it later.';
      break;
  }
  return confirm_form($form, t($question), 'admin/config/validation/clientside_validation', t($info), t(drupal_ucfirst($action)), t('Cancel'));
}