You are here

function simplenews_confirm_add_form in Simplenews 5

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

Generate the confirm add form.

1 string reference to 'simplenews_confirm_add_form'
simplenews_confirm_subscription in ./simplenews.module
Menu callback; confirm the user's (un)subscription request when they click on the confirm link in the e-mail footer.

File

./simplenews.module, line 2638

Code

function simplenews_confirm_add_form($mail, $newsletter) {
  $form = array();
  $form['question'] = array(
    '#value' => '<p>' . t('Are you sure you want to add %user to the %newsletter subscription list?', array(
      '%user' => $mail,
      '%newsletter' => $newsletter->name,
    )) . "<p>\n",
  );
  $form['mail'] = array(
    '#type' => 'value',
    '#value' => $mail,
  );
  $form['newsletter'] = array(
    '#type' => 'value',
    '#value' => $newsletter,
  );
  return confirm_form($form, t('Confirm subscription'), '', t('You always have the option of unsubscribing later.'), t('Subscribe'), t('Cancel'));
}