You are here

function newsletter_template_delete in Newsletter 7

Same name and namespace in other branches
  1. 7.2 modules/template/newsletter_template.module \newsletter_template_delete()

Menu callback; delete newsletter templates.

1 string reference to 'newsletter_template_delete'
newsletter_menu in ./newsletter.module
Implements hook_menu().

File

includes/newsletter.admin.inc, line 1270
Admin page callbacks for the newsletter module.

Code

function newsletter_template_delete($form, &$form_state, $template) {
  $form['id'] = array(
    '#type' => 'hidden',
    '#value' => $template->ntid,
  );
  $output = t('Are you sure you want to delete the following template?');
  $output .= '<ul>';
  $output .= '<li>' . check_plain($template->subject) . '</li>';
  $output .= '</ul>';
  $output .= t('This action cannot be undone.');
  return confirm_form($form, t('Delete the following?'), 'admin/config/media/newsletter/templates', filter_xss($output));
}