You are here

function print_mail_strings_settings in Printer, email and PDF versions 6

Same name and namespace in other branches
  1. 5.4 print_mail/print_mail.admin.inc \print_mail_strings_settings()
  2. 7 print_mail/print_mail.admin.inc \print_mail_strings_settings()
  3. 5.x print_mail/print_mail.admin.inc \print_mail_strings_settings()

Menu callback for the send by email module text strings settings form.

1 string reference to 'print_mail_strings_settings'
print_mail_menu in print_mail/print_mail.module
Implementation of hook_menu().

File

print_mail/print_mail.admin.inc, line 199
Contains the administrative functions of the send by email module.

Code

function print_mail_strings_settings() {
  drupal_set_message(t("Saving these strings will disable their translation via Drupal's language system. Use the reset button to return them to the original state."), 'warning', FALSE);
  $form['print_mail_text'] = array(
    '#type' => 'fieldset',
    '#title' => t('Text strings'),
  );
  $form['print_mail_text']['print_mail_link_text'] = array(
    '#type' => 'textfield',
    '#title' => t('Link text'),
    '#default_value' => variable_get('print_mail_link_text', t('Send by email')),
    '#description' => t('Text used in the link to the send by-email form.'),
  );
  $form['print_mail_text']['print_mail_text_title'] = array(
    '#type' => 'textfield',
    '#title' => t('Form page title'),
    '#default_value' => variable_get('print_mail_text_title', t('Send page by email')),
    '#description' => t("Text used as the page title of the mail submission form. Requires a menu rebuild to apply."),
  );
  $form['print_mail_text']['print_mail_text_subject'] = array(
    '#type' => 'textfield',
    '#title' => t('Message subject'),
    '#default_value' => variable_get('print_mail_text_subject', t('!user has sent you a message from !site')),
    '#description' => t("email subject line. The sender's name will appear in place of !user in the subject. The web site name will be inserted in place of !site. The page title replaces !title."),
  );
  $form['print_mail_text']['print_mail_text_message'] = array(
    '#type' => 'textarea',
    '#title' => t('Message preamble'),
    '#default_value' => variable_get('print_mail_text_message', t('Message from sender')),
    '#description' => t('email message preamble. The sender will be able to add their own message after this.'),
    '#wysiwyg' => FALSE,
  );
  $form['print_mail_text']['print_mail_text_content'] = array(
    '#type' => 'textarea',
    '#title' => t('Message content'),
    '#default_value' => variable_get('print_mail_text_content', ''),
    '#description' => t('Set the default contents of the message.'),
    '#wysiwyg' => FALSE,
  );
  $form['print_mail_text']['print_mail_text_confirmation'] = array(
    '#type' => 'textfield',
    '#title' => t('Thank you message'),
    '#default_value' => variable_get('print_mail_text_confirmation', t('Thank you for spreading the word about !site.')),
    '#description' => t('This message will be displayed after the user successfully submits the form.'),
    '#wysiwyg' => FALSE,
  );
  return system_settings_form($form);
}