From 66af4b35062b43559b9ca71734fe7194bbc26534 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 1 Nov 2019 09:42:34 +1100 Subject: [PATCH] dev/core#1344 Re-work if statements and remove excess ifs --- .../contribution_online_receipt_text.tpl | 18 ++++++++---------- .../membership_online_receipt_text.tpl | 18 ++++++++---------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/xml/templates/message_templates/contribution_online_receipt_text.tpl b/xml/templates/message_templates/contribution_online_receipt_text.tpl index 0ba58cd9a93..4c86a366c7b 100644 --- a/xml/templates/message_templates/contribution_online_receipt_text.tpl +++ b/xml/templates/message_templates/contribution_online_receipt_text.tpl @@ -126,14 +126,7 @@ {/foreach} {/if} -{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary} -{if $is_pay_later && !$isBillingAddressRequiredForPayLater} -=========================================================== -{ts}Registered Email{/ts} - -=========================================================== -{$email} -{elseif $amount GT 0} +{if $billingName} =========================================================== {ts}Billing Name and Address{/ts} @@ -142,8 +135,13 @@ {$address} {$email} -{/if} {* End ! is_pay_later condition. *} -{/if} +{elseif $email} +=========================================================== +{ts}Registered Email{/ts} + +=========================================================== +{$email} +{/if} {* End billingName or Email*} {if $credit_card_type} =========================================================== diff --git a/xml/templates/message_templates/membership_online_receipt_text.tpl b/xml/templates/message_templates/membership_online_receipt_text.tpl index 040e0efd7ef..3c97b7e0000 100644 --- a/xml/templates/message_templates/membership_online_receipt_text.tpl +++ b/xml/templates/message_templates/membership_online_receipt_text.tpl @@ -154,14 +154,7 @@ {/foreach} {/if} -{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary} -{if $is_pay_later} -=========================================================== -{ts}Registered Email{/ts} - -=========================================================== -{$email} -{elseif $amount GT 0 OR $membership_amount GT 0 } +{if $billingName} =========================================================== {ts}Billing Name and Address{/ts} @@ -170,8 +163,13 @@ {$address} {$email} -{/if} {* End ! is_pay_later condition. *} -{/if} +{elseif $email} +=========================================================== +{ts}Registered Email{/ts} + +=========================================================== +{$email} +{/if} {* End billingName or email *} {if $credit_card_type} ===========================================================