You are here

function spamicide_delete_confirm in Spamicide 7

Same name and namespace in other branches
  1. 5 spamicide.module \spamicide_delete_confirm()
  2. 6 spamicide.module \spamicide_delete_confirm()

Confirm dialog for deleting a Spamicide form

Parameters

$spamicide_form_id the form_id of the form to delete the Spamicide: protection from

$delete boolean for also deleting the Spamicide:

1 string reference to 'spamicide_delete_confirm'
spamicide_menu in ./spamicide.module
Implements hook_menu().

File

./spamicide.module, line 328
This module provides yet another tool to eliminate spam.

Code

function spamicide_delete_confirm($form, &$form_state, $spamicide_form_id, $delete) {
  $form['spamicide_form_id'] = array(
    '#type' => 'value',
    '#value' => $spamicide_form_id,
  );
  $form['spamicide_delete'] = array(
    '#type' => 'value',
    '#value' => $delete,
  );
  $message = t('Are you sure you want to remove Spamicide protection for form_id %form_id?', array(
    '%form_id' => $spamicide_form_id,
  ));
  $yes = t('Delete');
  return confirm_form($form, $message, isset($_GET['destination']) ? check_plain($_GET['destination']) : 'admin/config/people/spamicide/spamicide_form', '', $yes);
}