You are here

function simplenews_confirm_removal_form in Simplenews 6.2

Same name and namespace in other branches
  1. 5 simplenews.module \simplenews_confirm_removal_form()
  2. 6 simplenews.subscription.inc \simplenews_confirm_removal_form()
  3. 7.2 includes/simplenews.subscription.inc \simplenews_confirm_removal_form()
  4. 7 includes/simplenews.subscription.inc \simplenews_confirm_removal_form()

FAPI CONFIRM REMOVAL form.

See also

simplenews_confirm_removal_form_submit()

1 string reference to 'simplenews_confirm_removal_form'
simplenews_confirm_subscription in includes/simplenews.subscription.inc
Menu callback: confirm the user's (un)subscription request

File

includes/simplenews.subscription.inc, line 589
(Un)subscription and (un)subscription confirmation

Code

function simplenews_confirm_removal_form(&$form_state, $mail, $newsletter) {
  $form = array();
  $form['question'] = array(
    '#value' => '<p>' . t('Are you sure you want to remove %user from the %newsletter mailing list?', array(
      '%user' => simplenews_mask_mail($mail),
      '%newsletter' => $newsletter->name,
    )) . "<p>\n",
  );
  $form['mail'] = array(
    '#type' => 'value',
    '#value' => $mail,
  );
  $form['newsletter'] = array(
    '#type' => 'value',
    '#value' => $newsletter,
  );
  $form['#redirect'] = variable_get('simplenews_confirm_unsubscribe_page', '');
  return confirm_form($form, t('Confirm remove subscription'), '', t('You will no longer receive %newsletter mails.', array(
    '%newsletter' => $newsletter->name,
  )), t('Unsubscribe'), t('Cancel'));
}