Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#1344 Simplify email template logic on displaying billing detail #15646

Merged
merged 1 commit into from
Oct 29, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Oct 28, 2019

Overview

Per https://lab.civicrm.org/dev/core/issues/1344 we currently use complex & fragile logic whereas we can simply display what we have gathered. Since email templates are already being upgraded this release it feels like a good opportunity to clean these up too.

Before

Complex fragile logic using deprecated parameters

       {if $contributeMode ne 'notify' and !$isAmountzero and (!$is_pay_later or $isBillingAddressRequiredForPayLater) and !$isOnWaitlist and !$isRequireApproval}
        <tr>
         <th {$headerStyle}>
          {ts}Billing Name and Address{/ts}
         </th>
        </tr>
        <tr>
         <td colspan="2" {$valueStyle}>
          {$billingName}<br />
          {$address|nl2br}
         </td>
        </tr>
       {/if}

After

Simple logic


   {if $billingName}
        <tr>
         <th {$headerStyle}>
          {ts}Billing Name and Address{/ts}
         </th>
        </tr>
        <tr>
         <td colspan="2" {$valueStyle}>
          {$billingName}<br />
          {$address|nl2br}
         </td>
        </tr>
       {/if}

Technical Details

Comments

This just includes one template - but I'll rip through the rest if this gets merged & people agree

@civibot
Copy link

civibot bot commented Oct 28, 2019

(Standard links)

Per https://lab.civicrm.org/dev/core/issues/1344 we currently use complex & fragile logic whereas we can simply display
what we have gathered. Since email templates are already being upgraded this release it feels like a good
opportunity to clean these up too.

This just includes one template - but I'll rip through the rest if this gets merged & people agree
@seamuslee001
Copy link
Contributor

Makes sense to me, Merging

@eileenmcnaughton
Copy link
Contributor Author

I added a follow up - #15653 - there are still a handful more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants