function captcha_point_disable_confirm in CAPTCHA 5.3
Same name and namespace in other branches
- 6.2 captcha.admin.inc \captcha_point_disable_confirm()
- 6 captcha.admin.inc \captcha_point_disable_confirm()
- 7 captcha.admin.inc \captcha_point_disable_confirm()
Confirm dialog for disabling/deleting a CAPTCHA point
Parameters
$captcha_point_form_id the form_id of the form to disable the CAPTCHA: from
$delete boolean for also deleting the CAPTCHA point:
1 string reference to 'captcha_point_disable_confirm'
- captcha_menu in ./
captcha.module - Implementation of hook_menu().
File
- ./
captcha.module, line 417 - This module enables basic CAPTCHA functionality: administrators can add a CAPTCHA to desired forms that users without the 'skip CAPTCHA' permission (typically anonymous visitors) have to solve.
Code
function captcha_point_disable_confirm($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, isset($_GET['destination']) ? $_GET['destination'] : 'admin/user/captcha/captcha', '', $yes);
}