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 Oct 31, 2019
1 parent e7cbb73 commit d88185a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,32 +311,30 @@
</tr>
{/if}

{if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
{if $is_pay_later && !$isBillingAddressRequiredForPayLater}
{if $billingName}
<tr>
<th {$headerStyle}>
{ts}Registered Email{/ts}
{ts}Billing Name and Address{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$billingName}<br />
{$address|nl2br}<br />
{$email}
</td>
</tr>
{elseif $amount GT 0}
{elseif $email}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
{ts}Registered Email{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$billingName}<br />
{$address|nl2br}<br />
{$email}
</td>
</tr>
{/if}
{/if}

{if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
Expand Down
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 d88185a

Please sign in to comment.