You are here

function mail_signature_settings_form in Mail signature 7

Form builder; Configure the Mail Signature settings.

1 string reference to 'mail_signature_settings_form'
mail_signature_menu in ./mail_signature.module
Implements hook_menu().

File

./mail_signature.admin.inc, line 11
Admin callbacks for Mail Signature module.

Code

function mail_signature_settings_form($form) {
  module_load_include('inc', 'mail_signature');
  $form['#validate'][] = 'mail_signature_settings_form_validate';
  $form['mail_signature_enabled'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable mail signature'),
    '#default_value' => variable_get('mail_signature_enabled'),
    '#description' => t('Check to add signature to every mail.'),
  );
  $form['mail_signature_text'] = array(
    '#type' => 'textarea',
    '#title' => t('Text signature'),
    '#default_value' => variable_get('mail_signature_text'),
    '#description' => t("The system will add automatically the separator '--' before the signature,\n      so don't add it here or it will added two times."),
  );
  if (module_exists('token')) {
    $form['token_help'] = array(
      '#title' => t('Replacement patterns'),
      '#type' => 'fieldset',
      '#collapsible' => TRUE,
      '#collapsed' => TRUE,
    );
    $form['token_help']['help'] = array(
      '#theme' => 'token_tree',
      '#token_types' => array(
        'site',
      ),
    );
  }
  if (variable_get('mail_signature_mail') != '') {
    variable_del('mail_signature_mail');
  }
  $form['mail_signature_mail'] = array(
    '#type' => 'textfield',
    '#title' => t('Send mail to test signature'),
    '#default_value' => variable_get('mail_signature_mail'),
    '#description' => t('If you want to try the signature add here an email address to send a message.'),
  );
  return system_settings_form($form);
}