diff --git a/CRM/Upgrade/Incremental/MessageTemplates.php b/CRM/Upgrade/Incremental/MessageTemplates.php index 35db89aaf868..62aa413cfa1a 100644 --- a/CRM/Upgrade/Incremental/MessageTemplates.php +++ b/CRM/Upgrade/Incremental/MessageTemplates.php @@ -121,6 +121,51 @@ protected function getTemplateUpdates() { ['name' => 'pledge_acknowledge', 'type' => 'html'], ], ], + [ + 'version' => '5.20.alpha1', + 'upgrade_descriptor' => ts('Aditional email greetings and translation fixes'), + 'templates' => [ + ['name' => 'contribution_recurring_billing', 'type' => 'html'], + ['name' => 'contribution_recurring_billing', 'type' => 'text'], + ['name' => 'contribution_recurring_cancelled', 'type' => 'html'], + ['name' => 'contribution_recurring_cancelled', 'type' => 'text'], + ['name' => 'contribution_recurring_edit', 'type' => 'html'], + ['name' => 'contribution_recurring_edit', 'type' => 'text'], + ['name' => 'contribution_recurring_notify', 'type' => 'html'], + ['name' => 'contribution_recurring_notify', 'type' => 'text'], + ['name' => 'event_registration_receipt', 'type' => 'html'], + ['name' => 'event_registration_receipt', 'type' => 'text'], + ['name' => 'membership_autorenew_billing', 'type' => 'html'], + ['name' => 'membership_autorenew_billing', 'type' => 'text'], + ['name' => 'participant_cancelled', 'type' => 'html'], + ['name' => 'participant_cancelled', 'type' => 'text'], + ['name' => 'participant_confirm', 'type' => 'html'], + ['name' => 'participant_confirm', 'type' => 'text'], + ['name' => 'participant_expired', 'type' => 'html'], + ['name' => 'participant_expired', 'type' => 'text'], + ['name' => 'participant_transferred', 'type' => 'html'], + ['name' => 'participant_transferred', 'type' => 'text'], + ['name' => 'pcp_supporter_notify', 'type' => 'html'], + ['name' => 'pcp_supporter_notify', 'type' => 'text'], + ['name' => 'pledge_reminder', 'type' => 'html'], + ['name' => 'pledge_reminder', 'type' => 'text'], + ['name' => 'contribution_offline_receipt', 'type' => 'html'], + ['name' => 'contribution_offline_receipt', 'type' => 'text'], + ['name' => 'membership_autorenew_cancelled', 'type' => 'html'], + ['name' => 'membership_autorenew_cancelled', 'type' => 'text'], + ['name' => 'membership_offline_receipt', 'type' => 'html'], + ['name' => 'membership_offline_receipt', 'type' => 'text'], + ['name' => 'payment_or_refund_notification', 'type' => 'html'], + ['name' => 'payment_or_refund_notification', 'type' => 'text'], + ['name' => 'pcp_owner_notify', 'type' => 'html'], + ['name' => 'pcp_owner_notify', 'type' => 'text'], + ['name' => 'petition_confirmation_needed.tpl', 'type' => 'html'], + ['name' => 'petition_confirmation_needed.tpl', 'type' => 'text'], + ['name' => 'petition_sign.tpl', 'type' => 'html'], + ['name' => 'petition_sign.tpl', 'type' => 'text'], + ], + ], + ]; } diff --git a/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php b/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php index 67b81caae588..8ca640090982 100644 --- a/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php @@ -255,7 +255,7 @@ public function testIPNPaymentMembershipRecurSuccessNoLeakage() { 'Email Address: anthony_anderson@civicrm.org', 'Honor', 'This membership will be automatically renewed every', - 'Dear Mr. Anthony Anderson II', + 'Dear Anthony', 'Thanks for your auto renew membership sign-up', 'In Memory of', ]); @@ -281,7 +281,7 @@ public function testIPNPaymentMembershipRecurSuccessNoLeakage() { 'Last Name: Anderson', 'Email Address: antonia_anderson@civicrm.org', 'This membership will be automatically renewed every', - 'Dear Mrs. Antonia Anderson II', + 'Dear Antonia', 'Thanks for your auto renew membership sign-up', ]); @@ -316,7 +316,7 @@ public function testIPNPaymentMembershipRecurSuccessNoLeakageOnlineThenOffline() 'Last Name: Anderson', 'Email Address: anthony_anderson@civicrm.org', 'This membership will be automatically renewed every', - 'Dear Mr. Anthony Anderson II', + 'Dear Anthony', 'Thanks for your auto renew membership sign-up', ]); @@ -337,7 +337,7 @@ public function testIPNPaymentMembershipRecurSuccessNoLeakageOnlineThenOffline() 'Membership Start Date:', 'Transaction #: hers', 'This membership will be automatically renewed every', - 'Dear Mrs. Antonia Anderson II', + 'Dear Antonia', 'Thanks for your auto renew membership sign-up', ], [ diff --git a/xml/templates/message_templates/contribution_offline_receipt_html.tpl b/xml/templates/message_templates/contribution_offline_receipt_html.tpl index 8a840cef62c2..dc54a2490a4e 100644 --- a/xml/templates/message_templates/contribution_offline_receipt_html.tpl +++ b/xml/templates/message_templates/contribution_offline_receipt_html.tpl @@ -21,7 +21,7 @@
{$greeting},
{/if} {if $formValues.receipt_text}{$formValues.receipt_text|htmlize}
{else} diff --git a/xml/templates/message_templates/contribution_offline_receipt_text.tpl b/xml/templates/message_templates/contribution_offline_receipt_text.tpl index 6b46e34259eb..434bcd3e0f89 100644 --- a/xml/templates/message_templates/contribution_offline_receipt_text.tpl +++ b/xml/templates/message_templates/contribution_offline_receipt_text.tpl @@ -1,3 +1,5 @@ +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} + {if $formValues.receipt_text} {$formValues.receipt_text} {else}{ts}Thank you for your support.{/ts}{/if} diff --git a/xml/templates/message_templates/contribution_recurring_billing_html.tpl b/xml/templates/message_templates/contribution_recurring_billing_html.tpl index f2b9d4884239..14df6973eb56 100644 --- a/xml/templates/message_templates/contribution_recurring_billing_html.tpl +++ b/xml/templates/message_templates/contribution_recurring_billing_html.tpl @@ -21,7 +21,7 @@{ts 1=$contact.display_name}Dear %1{/ts},
+ {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},
{/if}{ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Billing details for your recurring contribution of %1, every %2 %3 have been updated.{/ts}