Use email_greeting where possible in receipts
authoreileen <emcnaughton@wikimedia.org>
Sun, 10 Jun 2018 23:01:29 +0000 (11:01 +1200)
committereileen <emcnaughton@wikimedia.org>
Sun, 10 Jun 2018 23:01:29 +0000 (11:01 +1200)
CRM/Upgrade/Incremental/MessageTemplates.php
xml/templates/message_templates/contribution_online_receipt_html.tpl
xml/templates/message_templates/contribution_online_receipt_text.tpl
xml/templates/message_templates/event_online_receipt_html.tpl
xml/templates/message_templates/event_online_receipt_text.tpl
xml/templates/message_templates/membership_online_receipt_html.tpl
xml/templates/message_templates/membership_online_receipt_text.tpl

index 158677f7d7cce85a344fd12f35fa91c6e034ec37..ece6e32606c2d52a02202a7934b006699410c54e 100644 (file)
@@ -75,6 +75,10 @@ class CRM_Upgrade_Incremental_MessageTemplates {
         'templates' => [
           ['name' => 'membership_online_receipt', 'type' => 'text'],
           ['name' => 'membership_online_receipt', 'type' => 'html'],
+          ['name' => 'contribution_online_receipt', 'type' => 'text'],
+          ['name' => 'contribution_online_receipt', 'type' => 'html'],
+          ['name' => 'event_online_receipt', 'type' => 'text'],
+          ['name' => 'event_online_receipt', 'type' => 'html'],
         ]
       ],
     ];
index ec976ed0e52579cd1878f42907ef7248e132ba8b..5f3c65aa17c897fb914d7d992a9dac3bcd53720d 100644 (file)
@@ -21,7 +21,7 @@
 
   <tr>
    <td>
-
+     {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
     {if $receipt_text}
      <p>{$receipt_text|htmlize}</p>
     {/if}
index c6328bc46e8921d9a50670ff3cb1e68b9b9d3dfa..7f016a6d2a61c27144ca0acf17f736edc4e17177 100644 (file)
@@ -1,3 +1,4 @@
+{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
 {if $receipt_text}
 {$receipt_text}
 {/if}
  {$customName}: {$customValue}
 {/if}
 {/foreach}
-{/if}
\ No newline at end of file
+{/if}
index f7ebf3663efd15343b1bb75cea531928c0bc1d56..ec0dab4432d4f4fc8b53df80e6ac402f269c0e10 100644 (file)
@@ -25,7 +25,7 @@
 
   <tr>
    <td>
-  <p>{contact.email_greeting},</p>
+     {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
 
     {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
      <p>{$event.confirm_email_text|htmlize}</p>
index b0233b41ea55d2d484459951f0f740d329dc7778..0734384d4c574e5d0a2b2ec97fd54f3020095371 100644 (file)
@@ -1,5 +1,4 @@
-{contact.email_greeting},
-
+{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
 {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
 {$event.confirm_email_text}
 
index 2e6136414f148edd0cd0fb99e2b5f8e67438b702..fbf9fdd460dff174680d97e84c99e5aaa6b4f346 100644 (file)
@@ -21,7 +21,7 @@
 
   <tr>
    <td>
-
+     {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
     {if $receipt_text}
      <p>{$receipt_text|htmlize}</p>
     {/if}
index 6072217a09e094a85f42995ed37a7d0f4b7bd0ef..aa61b62a6c1097832e67833e82e633c2cce3dcf6 100644 (file)
@@ -1,4 +1,4 @@
-{if $contact.email_greeting}{$contact.email_greeting},{/if}
+{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
 {if $receipt_text}
 {$receipt_text}
 {/if}