update email preview for html mails

This commit is contained in:
2017-06-27 22:00:35 +10:00
parent 2d37380939
commit c2f8d71664

View File

@@ -515,9 +515,6 @@ function _booking_email_get_preview_callback($form, $form_state) {
switch ($emailtype) { switch ($emailtype) {
case "registration": case "registration":
$text = variable_get('booking_email_bookedin_text'); $text = variable_get('booking_email_bookedin_text');
//watchdog('booking_debug', "<pre>Email generation:\n@info</pre>", 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; break;
case "balance": case "balance":
$text = variable_get('booking_email_paymentoutstanding_text'); $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']); $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', "<pre>Email generation:\n@info</pre>", array('@info' => print_r( $text, true)));
//generate html that will be used to update div booking_email_preview_wrapper //generate html that will be used to update div booking_email_preview_wrapper
return $markup_pre . $text . $markup_post; return $markup_pre . $text . $markup_post;
} }