function mass_contact_admin_settings_header in Mass Contact 6
Same name and namespace in other branches
- 7 mass_contact.admin.inc \mass_contact_admin_settings_header()
Message header administration settings form.
Parameters
form_state: A keyed array containing the current state of the form.
Return value
An associative array that defines the form to be built.
1 string reference to 'mass_contact_admin_settings_header'
- mass_contact_menu in ./
mass_contact.module - Implementation of hook_menu().
File
- ./
mass_contact.module, line 773 - This is the main code file for the Mass Contact module. This module enables users to contact multiple users through selected roles.
Code
function mass_contact_admin_settings_header($form_state) {
////////////////////////////////////////////////////////////
// The default character set.
$form['mass_contact_character_set'] = array(
'#type' => 'textfield',
'#title' => t('Character set'),
'#default_value' => variable_get('mass_contact_character_set', ''),
'#description' => t('You may specify an alternate character set to use when sending e-mails. If left blank, the default of UTF-8 will be used. If you are unsure of what to put here, then leave it blank. Caution: setting this may not get you the results you desire. Other modules may come along and change that value after it has been set by this module.'),
);
////////////////////////////////////////////////////////////
// The sender's name and e-mail address.
$form['mass_contact_default_sender'] = array(
'#type' => 'fieldset',
'#title' => t('Default sender information'),
'#description' => t('If anything is specified in here, it is used in place of the "Your name" and "Your e-mail address" fileds when sending the mass e-mail. Otherwise, the sender\'s name and e-mail address will be the default values. You must fill in both values, if you want to specify a default.'),
);
$form['mass_contact_default_sender']['mass_contact_default_sender_name'] = array(
'#type' => 'textfield',
'#title' => t('Default sender name'),
'#default_value' => variable_get('mass_contact_default_sender_name', ''),
'#size' => 60,
'#maxlength' => 128,
'#description' => t('The optional user name to send e-mail as. Replaces the "Your name" value when sending mass e-mails.'),
);
$form['mass_contact_default_sender']['mass_contact_default_sender_email'] = array(
'#type' => 'textfield',
'#title' => t('Default sender e-mail address'),
'#default_value' => variable_get('mass_contact_default_sender_email', ''),
'#size' => 60,
'#maxlength' => 128,
'#description' => t('The optional user e-mail address to send e-mail as. Replaces the "Your e-mail address" value when sending mass e-mails.'),
);
$form['mass_contact_default_sender']['mass_contact_default_sender_changable'] = array(
'#type' => 'checkbox',
'#title' => t('Allow the sender to change these values.'),
'#default_value' => variable_get('mass_contact_default_sender_changable', 0),
'#description' => t('If checked, gives the sender the ability of changing the default sender and e-mail address when creating the message. If unchecked, the fields will be disabled.'),
);
// Category options.
$form['mass_contact_category_display'] = array(
'#type' => 'radios',
'#title' => t('Field to use to display the categories'),
'#default_value' => variable_get('mass_contact_category_display', 'select'),
'#options' => array(
'select' => 'Select list',
'checkboxes' => 'Check boxes',
),
'#description' => t("Select the form field to use to display the available categories to the message sender."),
);
////////////////////////////////////////////////////////////
// Sender name options.
$form['mass_contact_include_name'] = array(
'#type' => 'fieldset',
'#title' => t('Include names with email addresses'),
'#description' => t("Checking either of the boxes below will include the name along with the email address, in the form of '%address'. If you have problems with sending mail, especially when your site is on a Windows server, try unchecking both checkboxes.", array(
'%address' => 'User name <email.address@example.com>',
)),
);
$form['mass_contact_include_name']['mass_contact_include_from_name'] = array(
'#type' => 'checkbox',
'#title' => t('Include the name for the sender'),
'#default_value' => variable_get('mass_contact_include_from_name', 0),
);
$form['mass_contact_include_name']['mass_contact_include_to_name'] = array(
'#type' => 'checkbox',
'#title' => t('Include the names for the recipients'),
'#default_value' => variable_get('mass_contact_include_to_name', 0),
'#description' => t("The name used for the recipients will be their site login ID."),
);
////////////////////////////////////////////////////////////
// BCC options.
$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_bcc_d_override'] = array(
'#type' => 'checkbox',
'#title' => t('Allow sender to override BCC setting.'),
'#default_value' => variable_get('mass_contact_bcc_d_override', 1),
);
////////////////////////////////////////////////////////////
// More category options.
$form['mass_contact_category_override'] = array(
'#type' => 'checkbox',
'#title' => t('Include category in subject line.'),
'#default_value' => variable_get('mass_contact_category_override', 1),
);
return system_settings_form($form);
}