Skip to content

Commit

Permalink
dev/core#1344 Re-work if statements and remove excess ifs
Browse files Browse the repository at this point in the history
  • Loading branch information
seamuslee001 committed Nov 1, 2019
1 parent e7cbb73 commit 66af4b3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand All @@ -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}

===========================================================
Expand Down
18 changes: 8 additions & 10 deletions xml/templates/message_templates/membership_online_receipt_text.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand All @@ -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}

===========================================================
Expand Down

0 comments on commit 66af4b3

Please sign in to comment.