You are here

function captcha_point_disable_confirm in CAPTCHA 6

Same name and namespace in other branches
  1. 5.3 captcha.module \captcha_point_disable_confirm()
  2. 6.2 captcha.admin.inc \captcha_point_disable_confirm()
  3. 7 captcha.admin.inc \captcha_point_disable_confirm()

Confirm dialog for disabling/deleting a CAPTCHA point

1 string reference to 'captcha_point_disable_confirm'
captcha_point_admin in ./captcha.admin.inc
Central handler for CAPTCHA point administration (adding, disabling, deleting)

File

./captcha.admin.inc, line 260

Code

function captcha_point_disable_confirm(&$form_state, $captcha_point_form_id, $delete) {
  $form = array();
  $form['captcha_point_form_id'] = array(
    '#type' => 'value',
    '#value' => $captcha_point_form_id,
  );
  $form['captcha_point_delete'] = array(
    '#type' => 'value',
    '#value' => $delete,
  );
  if ($delete) {
    $message = t('Are you sure you want to delete the CAPTCHA for form_id %form_id?', array(
      '%form_id' => $captcha_point_form_id,
    ));
    $yes = t('Delete');
  }
  else {
    $message = t('Are you sure you want to disable the CAPTCHA for form_id %form_id?', array(
      '%form_id' => $captcha_point_form_id,
    ));
    $yes = t('Disable');
  }
  return confirm_form($form, $message, 'admin/user/captcha/captcha', '', $yes);
}