Commit 3d1f2e45 authored by jcnventura's avatar jcnventura

Fix #384294 by ron_s: use padding instead of margin in icons

Fix #381586 by Fleshgrinder: add space at the end of the reset button in the send mail form
Fix #372250: Add page title to send mail form and the ability to use the !title token
Improvements to the API index.php
Updated slovak translation by etki
parent f4236c76
......@@ -3,12 +3,15 @@
/**
* @file
* Homepage of the API reference
* Homepage of the print module API reference
*/
/** @mainpage Printer, e-mail and PDF versions
* Welcome to the module developer's documentation. The interesting functions for
* themers are those that start with 'theme_'.
// * @page module-print modules/print: Printer, e-mail and PDF versions
/**
* @mainpage Printer, e-mail and PDF versions
* Welcome to the print module developer's documentation. The interesting
* functions for themers are those that start with 'theme_'.
*
* - Printer-friendly pages (core)
* - @link print.module Module main file @endlink
......
......@@ -12,7 +12,7 @@
}
img.print-icon-margin {
margin-left: 4px;
padding-left: 4px;
}
label.printmail-label {
......
......@@ -16,7 +16,7 @@ img.print-icon {
}
img.print-icon-margin {
margin-right: 4px;
padding-right: 4px;
}
label.printmail-label {
......
......@@ -146,7 +146,7 @@ function print_mail_settings() {
* @ingroup forms
*/
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');
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',
......@@ -164,7 +164,7 @@ function print_mail_strings_settings() {
'#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."),
'#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' => 'textfield',
......
......@@ -41,6 +41,7 @@ function print_mail_form($form_state) {
$path = 'node/'. $path;
}
$cid = isset($_GET['comment']) ? (int)$_GET['comment'] : NULL;
$title = _print_get_title($path);
if (count($form_state['post']) == 0) {
$nodepath = drupal_get_normal_path($path);
......@@ -79,6 +80,11 @@ function print_mail_form($form_state) {
'#title' => t('Subject'),
'#size' => 62,
);
$form['fld_title'] = array(
'#type' => 'item',
'#title' => t('Page to be sent'),
'#markup' => l($title, $path, array('attributes' => array('title' => t('View page')))),
);
$form['txt_message'] = array(
'#type' => 'textarea',
'#title' => t('Your message'),
......@@ -103,7 +109,7 @@ function print_mail_form($form_state) {
);
$form['btn_clear'] = array(
'#type' => 'markup',
'#markup' => '<input type="reset" name="clear" value="'. t('Clear form') .'" class="form-submit" />',
'#markup' => '<input type="reset" name="clear" value="'. t('Clear form') .'" class="form-submit" /> ',
);
$form['btn_cancel'] = array(
'#name' => 'cancel',
......@@ -123,7 +129,7 @@ function print_mail_form($form_state) {
}
$site_name = variable_get('site_name', t('an interesting site'));
$print_mail_text_subject = variable_get('print_mail_text_subject', t('!user has sent you a message from !site'));
$form['fld_subject']['#default_value'] = t($print_mail_text_subject, array('!user' => $user_name, '!site' => $site_name));
$form['fld_subject']['#default_value'] = t($print_mail_text_subject, array('!user' => $user_name, '!site' => $site_name, '!title' => $title));
$print_mail_text_content = variable_get('print_mail_text_content', '');
$form['txt_message']['#default_value'] = t($print_mail_text_content);
......@@ -148,6 +154,7 @@ function theme_print_mail_form($form) {
case 'fld_from_name':
case 'txt_to_addrs':
case 'fld_subject':
case 'fld_title':
$tmp = str_replace('<label', '<label class ="printmail-label"', $tmp);
break;
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment