remove unnecessary <pre> tag

This commit is contained in:
Nathan Coad
2018-01-15 23:31:22 +11:00
parent 87b53bbc24
commit 6e8adebeb5

View File

@@ -651,10 +651,18 @@ function _booking_email_get_preview_callback($form, $form_state) {
break; break;
case "balance": case "balance":
$text = variable_get('booking_email_paymentoutstanding_text'); $text = variable_get('booking_email_paymentoutstanding_text');
// perform the checking of HTML value now since we're pre-pending text to it
$text = isset($text['format']) ? $text['value'] : $text;
if (variable_get('booking_enable_combined_pricing', 0) == 1) { if (variable_get('booking_enable_combined_pricing', 0) == 1) {
$text .= "\n</pre><h3>If married</h3>\n<pre>"; // no <pre> tags necessary if its a HTML mail
if(variable_get('booking_enable_html_mail', 0) == 1) {
$text .= "\n<h3>If married</h3>\n";
}
else {
$text .= "\n</pre><h3>If married</h3>\n<pre>";
}
$married_text = variable_get('booking_email_paymentoutstanding_married_text'); $married_text = variable_get('booking_email_paymentoutstanding_married_text');
// perform the checking of HTML value now since we're pre-pending text to it // repeat HTML check for rest of preview
$text .= isset($married_text['format']) ? $married_text['value'] : $married_text; $text .= isset($married_text['format']) ? $married_text['value'] : $married_text;
} }
break; break;