You are here

function multiple_email_admin_settings in Multiple E-mail Addresses 6

Same name and namespace in other branches
  1. 5 multiple_email.module \multiple_email_admin_settings()
  2. 7 multiple_email.module \multiple_email_admin_settings()
  3. 2.x multiple_email.module \multiple_email_admin_settings()

Settings form for site configuration section.

1 string reference to 'multiple_email_admin_settings'
multiple_email_menu in ./multiple_email.module
Implementation of hook_menu().

File

./multiple_email.module, line 304
multiple_email module file

Code

function multiple_email_admin_settings() {
  $form['multiple_email_hide_field'] = array(
    '#type' => 'select',
    '#title' => t('Hide E-mail Field'),
    '#description' => t('Hides the e-mail field when editing a user'),
    '#options' => array(
      'No',
      'Yes',
    ),
    '#default_value' => variable_get('multiple_email_hide_field', 1),
  );
  $form['multiple_email_edit_emails'] = array(
    '#type' => 'select',
    '#title' => t('Allow editing of emails'),
    '#description' => t('Allows editing of e-mail addresses. It is equivalent to deleting and adding a new e-mail address, as edited emails must be re-confirmed. If enabled, e-mail addresses (excluding primary) may be edited via the multiple e-mail tab.'),
    '#options' => array(
      'No',
      'Yes',
    ),
    '#default_value' => variable_get('multiple_email_edit_emails', 0),
  );
  $form['multiple_email_confirm_attempts'] = array(
    '#type' => 'textfield',
    '#size' => 4,
    '#title' => t('Confirm Attempts'),
    '#description' => t('How many times a user enters a confirmation code before a new one is generated. If set to 0, no new codes are sent after the first one.'),
    '#default_value' => variable_get('multiple_email_confirm_attempts', 3),
  );
  $form['multiple_email_confirm_deadline'] = array(
    '#type' => 'textfield',
    '#size' => 4,
    '#title' => t('Confirm Days'),
    '#description' => t('How many days a user has to enter a confirmation code. If 0, emails pending confirmation do not expire.'),
    '#default_value' => variable_get('multiple_email_confirm_deadline', 5),
  );
  $vars = '!username, !site, !email, !confirm_code, !confirm_url, !confirm_deadline';
  $form['multiple_email_confirmation_subject'] = array(
    '#type' => 'textfield',
    '#title' => t('Confirmation E-mail Subject'),
    '#description' => t('Customize the subject of the message to be sent when a user adds a new e-mail to their account.') . '<br/>' . t('Available variables are:') . $vars,
    '#default_value' => variable_get('multiple_email_confirmation_subject', multiple_email_default_subject('confirmation')),
  );
  $form['multiple_email_confirmation_body'] = array(
    '#type' => 'textarea',
    '#title' => t('Confirmation E-mail Body'),
    '#description' => t('Customize the body of the message to be sent when a user adds a new e-mail to their account.') . '<br/>' . t('Available variables are:') . $vars,
    '#default_value' => variable_get('multiple_email_confirmation_body', multiple_email_default_body('confirmation')),
  );
  $form['multiple_email_expire_subject'] = array(
    '#type' => 'textfield',
    '#title' => t('Expire E-mail Subject'),
    '#description' => t('Customize the subject of the message to be sent when an unconfirmed e-mail address expires.') . '<br/>' . t('Available variables are:') . $vars,
    '#default_value' => variable_get('multiple_email_expire_subject', multiple_email_default_subject('expire')),
  );
  $form['multiple_email_expire_body'] = array(
    '#type' => 'textarea',
    '#title' => t('Expire E-mail Body'),
    '#description' => t('Customize the body of the message to be sent when an unconfirmed e-mail address expires.') . '<br/>' . t('Available variables are:') . $vars,
    '#default_value' => variable_get('multiple_email_expire_body', multiple_email_default_body('expire')),
  );
  return system_settings_form($form);
}