dev/core#1010 pledge_acknowledge template - capitalization and greeting
authorPhilMB <philmorbru@gmail.com>
Thu, 6 Jun 2019 17:51:11 +0000 (12:51 -0500)
committerPhilMB <philmorbru@gmail.com>
Thu, 6 Jun 2019 17:51:11 +0000 (12:51 -0500)
Pledge Acknowledgements have incorrect capitalization in greetings, and greetings do not use email_greeting.

CRM/Upgrade/Incremental/MessageTemplates.php
xml/templates/message_templates/pledge_acknowledge_html.tpl
xml/templates/message_templates/pledge_acknowledge_text.tpl

index 163b8fd0883b62065be4d51947decb3fe09d1ed8..55b3d71f9ec6ccb74e46c8ea80d1af1fbe909839 100644 (file)
@@ -112,6 +112,15 @@ class CRM_Upgrade_Incremental_MessageTemplates {
           ['name' => 'payment_or_refund_notification', 'type' => 'html'],
         ],
       ],
+      [
+        'version' => '5.14',
+        'upgrade_descriptor' => ts('Use email greeting and fix capitalization'),
+        'label' => ts('Pledge acknowledgement'),
+        'templates' => [
+          ['name' => 'pledge_acknowledge', 'type' => 'text'],
+          ['name' => 'pledge_acknowledge', 'type' => 'html'],
+        ],
+      ],
     ];
   }
 
index c0727c407892d75ab4c4dfead936aef9c7d44f96..bfa55411c35498900aeaa83aa2d7c9d09748c782 100644 (file)
@@ -21,8 +21,8 @@
 
   <tr>
    <td>
-    <p>{ts 1=$contact.display_name}dear %1{/ts},</p>
-    <p>{ts}thank you for your generous pledge. please print this acknowledgment for your records.{/ts}</p>
+    {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
+    <p>{ts}Thank you for your generous pledge. Please print this acknowledgment for your records.{/ts}</p>
    </td>
   </tr>
   <tr>
index 571f1b1bea2ab45dfce3b2a1a24d0f36ebc04472..1a500f757ea79837df395bf3ca4f4ab0c6bcd8f0 100644 (file)
@@ -1,4 +1,4 @@
-{ts 1=$contact.display_name}Dear %1{/ts},
+{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
 
 {ts}Thank you for your generous pledge. Please print this acknowledgment for your records.{/ts}