diff --git a/booking.emails.inc b/booking.emails.inc index 6698458..766a630 100644 --- a/booking.emails.inc +++ b/booking.emails.inc @@ -342,6 +342,10 @@ function _booking_custom_email($nid, $email_type, $sender = 'contact') { $message_body = isset($message_body['format']) ? $message_body['value'] : $message_body; $message_body = token_replace($message_body, $tokens); + //get the footer text + $message_footer = variable_get('booking_html_mail_footer'); + $message_footer = isset($message_footer['format']) ? $message_footer['value'] : $message_footer; + //Check if we should apply a HTML theme to the email text or just send a normal email if(variable_get('booking_enable_html_mail', 0) == 1) { $html_body = theme('booking_htmlmail_registration_mail', @@ -350,6 +354,7 @@ function _booking_custom_email($nid, $email_type, $sender = 'contact') { 'key' => 'booking_email_custom', 'body' => $message_body, 'subject' => $subject, + 'footer' => $message_footer, )); watchdog('booking_debug', "
HTML body themed\n@info
", array('@info' => print_r($html_body, true))); $params['body'] = $html_body; diff --git a/booking.emails_admin.inc b/booking.emails_admin.inc index cecb22a..41aca4c 100644 --- a/booking.emails_admin.inc +++ b/booking.emails_admin.inc @@ -75,7 +75,7 @@ function booking_emails_admin() { if(variable_get('booking_enable_html_mail', 0) == 1) { $form['emails']['booking_html_mail_footer'] = array( '#title' => t('Footer text for HTML email'), - '#description' => t('Enter HTML to go in the footer of the email template (above the social media icons).'), + '#description' => t('Enter HTML to go in the footer of the email template (above the social media icons).
NOTE: No token subsitutions will be made here.'), '#default_value' => isset(variable_get('booking_html_mail_footer')['value']) ? variable_get('booking_html_mail_footer')['value'] : variable_get('booking_html_mail_footer', '

 

'), '#type' => 'text_format', '#format' => 'full_html', diff --git a/booking.module b/booking.module index 5026bc8..22018eb 100644 --- a/booking.module +++ b/booking.module @@ -853,11 +853,7 @@ function booking_theme($existing, $type, $theme, $path) { if($type == 'module') { $theme_path = drupal_get_path('module', 'booking'). '/theme'; // if our more heavily customised template exists, use that, otherwise fall back to the generic one - $template_file = is_file($theme_path . '/mimemail-message-registration_mail.tpl.php') ? '/mimemail-message-registration_mail' : '/mimemail-message'; - - //get the footer text - $message_footer = variable_get('booking_html_mail_footer'); - $message_footer = isset($message_footer['format']) ? $message_footer['value'] : $message_footer; + $template_file = is_file($theme_path . '/mimemail-message-registration_mail.tpl.php') ? '/mimemail-message-registration_mail' : '/mimemail-message'; return array( 'booking_details' => array('arguments' => array('node' => NULL)), @@ -867,7 +863,7 @@ function booking_theme($existing, $type, $theme, $path) { 'template' => 'mimemail-message' // extension of .tpl.php automatically added ), 'booking_htmlmail_registration_mail' => array( - 'variables' => array('subject' => NULL, 'body' => NULL, 'footer' => $message_footer), + 'variables' => array('subject' => NULL, 'body' => NULL, 'footer' => NULL), 'path' => $theme_path, 'image_path' => drupal_get_path('module', 'booking'). '/images', 'template' => $template_file,