From c2f8d71664d67dbba4e68e278181cdcdd5e5495f Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Tue, 27 Jun 2017 22:00:35 +1000 Subject: [PATCH] update email preview for html mails --- booking.emails_admin.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/booking.emails_admin.inc b/booking.emails_admin.inc index 0af3061..bd171c5 100644 --- a/booking.emails_admin.inc +++ b/booking.emails_admin.inc @@ -515,9 +515,6 @@ function _booking_email_get_preview_callback($form, $form_state) { switch ($emailtype) { case "registration": $text = variable_get('booking_email_bookedin_text'); - //watchdog('booking_debug', "
Email generation:\n@info
", array('@info' => print_r( $text, true))); - //use the html value if it is set, otherwise use the plaintext input which is just a string - $text = isset($text['format']) ? $text['value'] : $text; break; case "balance": $text = variable_get('booking_email_paymentoutstanding_text'); @@ -549,6 +546,10 @@ function _booking_email_get_preview_callback($form, $form_state) { $text = variable_get('booking_email_' . $form_state['values']['email-type']); } + //use the html value if it is set, otherwise use the plaintext input which is just a string + $text = isset($text['format']) ? $text['value'] : $text; + //watchdog('booking_debug', "
Email generation:\n@info
", array('@info' => print_r( $text, true))); + //generate html that will be used to update div booking_email_preview_wrapper return $markup_pre . $text . $markup_post; }