You are here

function webform_email_delete_form in Webform 6.3

Same name and namespace in other branches
  1. 7.4 includes/webform.emails.inc \webform_email_delete_form()
  2. 7.3 includes/webform.emails.inc \webform_email_delete_form()

Form for deleting an e-mail setting.

1 string reference to 'webform_email_delete_form'
webform_menu in ./webform.module
Implements hook_menu().

File

includes/webform.emails.inc, line 464
Provides interface and database handling for e-mail settings of a webform.

Code

function webform_email_delete_form($form_state, $node, $email) {
  $eid = $email['eid'];
  $form = array();
  $form['node'] = array(
    '#type' => 'value',
    '#value' => $node,
  );
  $form['email'] = array(
    '#type' => 'value',
    '#value' => $email,
  );
  $question = t('Delete e-mail settings?');
  if (is_numeric($email['email'])) {
    $description = t('This will immediately delete the e-mail settings based on the @component component.', array(
      '@component' => $email['email'],
    ));
  }
  else {
    $description = t('This will immediately delete the e-mail settings sending to the @address address.', array(
      '@address' => $email['email'],
    ));
  }
  return confirm_form($form, $question, 'node/' . $node->nid . '/webform/emails', $description, t('Delete'));
}