You are here

function mass_contact_admin_settings in Mass Contact 5

Same name and namespace in other branches
  1. 5.2 mass_contact.module \mass_contact_admin_settings()
1 string reference to 'mass_contact_admin_settings'
mass_contact_menu in ./mass_contact.module
Implementation of hook_menu().

File

./mass_contact.module, line 252
Enables mass contact form to selected roles.

Code

function mass_contact_admin_settings() {
  $form['mass_contact_form_information'] = array(
    '#type' => 'textarea',
    '#title' => t('Additional information for Mass Contact form'),
    '#default_value' => variable_get('mass_contact_form_information', t('Send emails using the following form.')),
    '#description' => t('Information to show on the <a href="@form">Mass Contact page</a>.', array(
      '@form' => url('mass_contact'),
    )),
  );
  $form['mass_contact_HTML_d'] = array(
    '#type' => 'checkbox',
    '#title' => t('Send as HTML by default'),
    '#default_value' => variable_get('mass_contact_HTML_d', 1),
  );
  $form['mass_contact_bcc_d'] = array(
    '#type' => 'checkbox',
    '#title' => t('Send as Bcc (hide recipients) by default'),
    '#default_value' => variable_get('mass_contact_bcc_d', 1),
  );
  $form['mass_contact_nodecc_d'] = array(
    '#type' => 'checkbox',
    '#title' => t('Save a copy as a node by default'),
    '#default_value' => variable_get('mass_contact_nodecc_d', 1),
  );
  $form['mass_contact_optout_d'] = array(
    '#type' => 'checkbox',
    '#title' => t('Allow users to opt-out of mass emails'),
    '#default_value' => variable_get('mass_contact_optout_d', 1),
  );
  $form['mass_contact_recipient_limit'] = array(
    '#type' => 'textfield',
    '#title' => t('Max number of users before breaking up the e-mail'),
    '#size' => 4,
    '#default_value' => variable_get('mass_contact_recipient_limit', 0),
    '#description' => t('This is a workaround for server-side limits on the number of recipients in a single mail message.  Once this limit is reached, the recipient list will be broken up and multiple copies of the message will be sent out until all recipients receive the mail.  Setting this to "0" will turn off this feature.'),
  );
  $form['mass_contact_hourly_threshold'] = array(
    '#type' => 'select',
    '#title' => t('Hourly threshold'),
    '#options' => drupal_map_assoc(array(
      1,
      2,
      3,
      4,
      5,
      6,
      7,
      8,
      9,
      10,
      20,
      30,
      40,
      50,
    )),
    '#default_value' => variable_get('mass_contact_hourly_threshold', 3),
    '#description' => t('The maximum number of Mass Contact form submissions a user can perform per hour.'),
  );
  return system_settings_form($form);
}