You are here

function htmlmail_template_settings in HTML Mail 7

Same name and namespace in other branches
  1. 5 htmlmail.module \htmlmail_template_settings()
  2. 6 htmlmail.admin.inc \htmlmail_template_settings()

Builds a form for setting Header, Footer, and CSS content to be included in sent emails.

1 string reference to 'htmlmail_template_settings'
htmlmail_menu in ./htmlmail.module
Implements hook_menu().

File

./htmlmail.admin.inc, line 102
Admin forms for HTML Mail

Code

function htmlmail_template_settings() {
  $defaults = array(
    'value' => '',
    'format' => filter_default_format(),
  );
  $header = variable_get('htmlmail_header', $defaults);
  $form['htmlmail_header'] = array(
    '#type' => 'text_format',
    '#title' => t('Header HTML'),
    '#rows' => 6,
    '#default_value' => $header['value'],
    '#format' => $header['format'],
    '#description' => t('Extra HTML markup to add at the top of emails.'),
  );
  $footer = variable_get('htmlmail_footer', $defaults);
  $form['htmlmail_footer'] = array(
    '#type' => 'text_format',
    '#title' => t('Footer HTML'),
    '#rows' => 6,
    '#default_value' => $footer['value'],
    '#format' => $footer['format'],
    '#description' => t('Extra HTML markup to add at the bottom of emails.'),
  );
  $form['htmlmail_css'] = array(
    '#type' => 'textarea',
    '#title' => t('CSS'),
    '#default_value' => variable_get('htmlmail_css', ''),
    '#description' => t('Extra CSS rules to be added to emails.'),
  );
  return system_settings_form($form);
}