From 3eb013ed19a9750f1f588bcf134a83dcbaf2ada0 Mon Sep 17 00:00:00 2001 From: PhilMB Date: Thu, 6 Jun 2019 12:51:11 -0500 Subject: [PATCH] dev/core#1010 pledge_acknowledge template - capitalization and greeting Pledge Acknowledgements have incorrect capitalization in greetings, and greetings do not use email_greeting. --- CRM/Upgrade/Incremental/MessageTemplates.php | 9 +++++++++ .../message_templates/pledge_acknowledge_html.tpl | 4 ++-- .../message_templates/pledge_acknowledge_text.tpl | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CRM/Upgrade/Incremental/MessageTemplates.php b/CRM/Upgrade/Incremental/MessageTemplates.php index 163b8fd088..55b3d71f9e 100644 --- a/CRM/Upgrade/Incremental/MessageTemplates.php +++ b/CRM/Upgrade/Incremental/MessageTemplates.php @@ -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'], + ], + ], ]; } diff --git a/xml/templates/message_templates/pledge_acknowledge_html.tpl b/xml/templates/message_templates/pledge_acknowledge_html.tpl index c0727c4078..bfa55411c3 100644 --- a/xml/templates/message_templates/pledge_acknowledge_html.tpl +++ b/xml/templates/message_templates/pledge_acknowledge_html.tpl @@ -21,8 +21,8 @@ -

{ts 1=$contact.display_name}dear %1{/ts},

-

{ts}thank you for your generous pledge. please print this acknowledgment for your records.{/ts}

+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if} +

{ts}Thank you for your generous pledge. Please print this acknowledgment for your records.{/ts}

diff --git a/xml/templates/message_templates/pledge_acknowledge_text.tpl b/xml/templates/message_templates/pledge_acknowledge_text.tpl index 571f1b1bea..1a500f757e 100644 --- a/xml/templates/message_templates/pledge_acknowledge_text.tpl +++ b/xml/templates/message_templates/pledge_acknowledge_text.tpl @@ -1,4 +1,4 @@ -{ts 1=$contact.display_name}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if} {ts}Thank you for your generous pledge. Please print this acknowledgment for your records.{/ts} -- 2.25.1