You are here

function simplenews_subscription_list_add in Simplenews 5

Same name and namespace in other branches
  1. 6.2 includes/simplenews.admin.inc \simplenews_subscription_list_add()
  2. 6 simplenews.admin.inc \simplenews_subscription_list_add()
  3. 7.2 includes/simplenews.admin.inc \simplenews_subscription_list_add()
  4. 7 includes/simplenews.admin.inc \simplenews_subscription_list_add()
1 string reference to 'simplenews_subscription_list_add'
simplenews_menu in ./simplenews.module
Implementation of hook_menu().

File

./simplenews.module, line 2089

Code

function simplenews_subscription_list_add() {
  $form['emails'] = array(
    '#type' => 'textarea',
    '#title' => t('E-mail addresses'),
    '#cols' => 60,
    '#rows' => 5,
    '#description' => t('Supply a comma separated list of e-mail addresses to be added to the list. Spaces between commas and addresses are allowed.'),
  );
  $newsletters = array();
  foreach (taxonomy_get_tree(variable_get('simplenews_vid', '')) as $newsletter) {
    $newsletters[$newsletter->tid] = check_plain($newsletter->name);
  }
  $form['newsletters'] = array(
    '#type' => 'fieldset',
    '#title' => t('Subscribe imported addresses to the following newsletter(s)'),
    '#collapsible' => FALSE,
  );
  $form['newsletters']['newsletters'] = array(
    '#type' => 'checkboxes',
    '#options' => $newsletters,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Import'),
  );
  return $form;
}