You are here

function print_mail_strings_settings in Printer, email and PDF versions 5.x

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

Menu callback for the send by e-mail 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 194
Contains the administrative functions of the send by e-mail 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 to friend')),
    '#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 e-mail')),
    '#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("e-mail 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('e-mail message preamble. The sender will be able to add their own message after this.'),
  );
  $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.'),
  );
  $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.'),
  );
  return system_settings_form($form);
}