function botcha_point_disable_confirm_submit in BOTCHA Spam Prevention 7
Same name and namespace in other branches
- 6 botcha.pages.inc \botcha_point_disable_confirm_submit()
Submission handler of BOTCHA point disabling/deleting confirm_form.
File
- ./
botcha.pages.inc, line 409 - Implementation of botcha administration forms.
Code
function botcha_point_disable_confirm_submit($form, &$form_state) {
//? module_load_include('inc', 'botcha');
$botcha_point_form_id = $form_state['values']['botcha_point_form_id'];
$delete = $form_state['values']['botcha_point_delete'];
if ($delete) {
botcha_set_form_id_setting($botcha_point_form_id, NULL);
drupal_set_message(t('Deleted BOTCHA for form %form_id.', array(
'%form_id' => $botcha_point_form_id,
)));
}
else {
botcha_set_form_id_setting($botcha_point_form_id, 'none');
drupal_set_message(t('Disabled BOTCHA for form %form_id.', array(
'%form_id' => $botcha_point_form_id,
)));
}
$form_state['redirect'] = 'admin/config/people/botcha/botcha';
}