You are here

function newsletter_template_delete_form in Newsletter 7.2

Form callback: confirmation form for deleting a template.

Parameters

$template: The template to delete

See also

newsletter_template_delete_form_submit()

confirm_form()

File

modules/template/includes/newsletter_template.admin.inc, line 132
hook_menu callbacks for admin pages.

Code

function newsletter_template_delete_form($form, &$form_state, $template) {
  $form['#template'] = $template;
  $form['#submit'][] = 'newsletter_template_delete_form_submit';
  if (entity_access('view', 'newsletter_template')) {
    $cancel = 'admin/config/media/newsletter/templates';
  }
  else {
    $cancel = '<front>';
  }
  $form = confirm_form($form, t('Are you sure you want to unsubscribe %mail?', array(
    '%mail' => $template->mail,
  )), $cancel, '<p>' . t('This action cannot be undone.') . '</p>', t('Delete'), t('Cancel'), 'confirm');
  return $form;
}