From 56658066af7eb55148bdee7e592f99419c555994 Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Wed, 16 Oct 2019 12:32:18 -0400 Subject: [PATCH] Additional email greetings in message templates --- CRM/Upgrade/Incremental/MessageTemplates.php | 79 +++++++++++++++++++ .../CRM/Core/Payment/AuthorizeNetIPNTest.php | 8 +- .../contribution_offline_receipt_html.tpl | 2 +- .../contribution_offline_receipt_text.tpl | 2 + .../contribution_recurring_billing_html.tpl | 4 +- .../contribution_recurring_billing_text.tpl | 4 +- .../contribution_recurring_cancelled_html.tpl | 2 +- .../contribution_recurring_cancelled_text.tpl | 2 +- .../contribution_recurring_edit_html.tpl | 2 +- .../contribution_recurring_edit_text.tpl | 4 +- .../contribution_recurring_notify_html.tpl | 2 +- .../contribution_recurring_notify_text.tpl | 2 +- .../event_registration_receipt_html.tpl | 3 +- .../event_registration_receipt_text.tpl | 3 +- .../membership_autorenew_billing_html.tpl | 2 +- .../membership_autorenew_billing_text.tpl | 4 +- .../membership_autorenew_cancelled_html.tpl | 2 +- .../membership_autorenew_cancelled_text.tpl | 2 + .../membership_offline_receipt_html.tpl | 1 + .../membership_offline_receipt_text.tpl | 2 + .../participant_cancelled_html.tpl | 2 +- .../participant_cancelled_text.tpl | 2 +- .../participant_confirm_html.tpl | 8 +- .../participant_confirm_text.tpl | 3 +- .../participant_expired_html.tpl | 2 +- .../participant_expired_text.tpl | 2 +- .../participant_transferred_html.tpl | 2 +- .../participant_transferred_text.tpl | 2 +- .../payment_or_refund_notification_html.tpl | 2 +- .../payment_or_refund_notification_text.tpl | 4 +- .../pcp_owner_notify_html.tpl | 1 + .../pcp_owner_notify_text.tpl | 2 + .../pcp_supporter_notify_html.tpl | 2 +- .../pcp_supporter_notify_text.tpl | 3 +- .../petition_confirmation_needed_html.tpl | 2 + .../petition_confirmation_needed_text.tpl | 2 + .../message_templates/petition_sign_html.tpl | 2 + .../message_templates/petition_sign_text.tpl | 2 + .../pledge_reminder_html.tpl | 2 +- .../pledge_reminder_text.tpl | 2 +- 40 files changed, 141 insertions(+), 40 deletions(-) diff --git a/CRM/Upgrade/Incremental/MessageTemplates.php b/CRM/Upgrade/Incremental/MessageTemplates.php index 35db89aaf8..a78a0aef36 100644 --- a/CRM/Upgrade/Incremental/MessageTemplates.php +++ b/CRM/Upgrade/Incremental/MessageTemplates.php @@ -121,6 +121,85 @@ class CRM_Upgrade_Incremental_MessageTemplates { ['name' => 'pledge_acknowledge', 'type' => 'html'], ], ], + [ + 'version' => '5.20.alpha1', + 'upgrade_descriptor' => ts('Fix missing Email greetings'), + 'templates' => [ + ['name' => 'contribution_dupalert', 'type' => 'subject'], + ['name' => 'contribution_invoice_receipt', 'type' => 'subject'], + ['name' => 'contribution_offline_receipt', 'type' => 'html'], + ['name' => 'contribution_offline_receipt', 'type' => 'subject'], + ['name' => 'contribution_offline_receipt', 'type' => 'text'], + ['name' => 'contribution_online_receipt', 'type' => 'subject'], + ['name' => 'contribution_recurring_billing', 'type' => 'html'], + ['name' => 'contribution_recurring_billing', 'type' => 'subject'], + ['name' => 'contribution_recurring_billing', 'type' => 'text'], + ['name' => 'contribution_recurring_cancelled', 'type' => 'html'], + ['name' => 'contribution_recurring_cancelled', 'type' => 'subject'], + ['name' => 'contribution_recurring_cancelled', 'type' => 'text'], + ['name' => 'contribution_recurring_edit', 'type' => 'html'], + ['name' => 'contribution_recurring_edit', 'type' => 'subject'], + ['name' => 'contribution_recurring_edit', 'type' => 'text'], + ['name' => 'contribution_recurring_notify', 'type' => 'html'], + ['name' => 'contribution_recurring_notify', 'type' => 'subject'], + ['name' => 'contribution_recurring_notify', 'type' => 'text'], + ['name' => 'event_offline_receipt', 'type' => 'html'], + ['name' => 'event_offline_receipt', 'type' => 'subject'], + ['name' => 'event_offline_receipt', 'type' => 'text'], + ['name' => 'event_online_receipt', 'type' => 'html'], + ['name' => 'event_online_receipt', 'type' => 'subject'], + ['name' => 'event_online_receipt', 'type' => 'text'], + ['name' => 'event_registration_receipt', 'type' => 'html'], + ['name' => 'event_registration_receipt', 'type' => 'subject'], + ['name' => 'event_registration_receipt', 'type' => 'text'], + ['name' => 'membership_autorenew_billing', 'type' => 'html'], + ['name' => 'membership_autorenew_billing', 'type' => 'subject'], + ['name' => 'membership_autorenew_billing', 'type' => 'text'], + ['name' => 'membership_autorenew_cancelled', 'type' => 'html'], + ['name' => 'membership_autorenew_cancelled', 'type' => 'subject'], + ['name' => 'membership_autorenew_cancelled', 'type' => 'text'], + ['name' => 'membership_offline_receipt', 'type' => 'html'], + ['name' => 'membership_offline_receipt', 'type' => 'subject'], + ['name' => 'membership_offline_receipt', 'type' => 'text'], + ['name' => 'membership_online_receipt', 'type' => 'subject'], + ['name' => 'participant_cancelled', 'type' => 'html'], + ['name' => 'participant_cancelled', 'type' => 'subject'], + ['name' => 'participant_cancelled', 'type' => 'text'], + ['name' => 'participant_confirm', 'type' => 'html'], + ['name' => 'participant_confirm', 'type' => 'subject'], + ['name' => 'participant_confirm', 'type' => 'text'], + ['name' => 'participant_expired', 'type' => 'html'], + ['name' => 'participant_expired', 'type' => 'subject'], + ['name' => 'participant_expired', 'type' => 'text'], + ['name' => 'participant_transferred', 'type' => 'html'], + ['name' => 'participant_transferred', 'type' => 'subject'], + ['name' => 'participant_transferred', 'type' => 'text'], + ['name' => 'payment_or_refund_notification', 'type' => 'html'], + ['name' => 'payment_or_refund_notification', 'type' => 'subject'], + ['name' => 'payment_or_refund_notification', 'type' => 'text'], + ['name' => 'pcp_notify', 'type' => 'subject'], + ['name' => 'pcp_owner_notify', 'type' => 'html'], + ['name' => 'pcp_owner_notify', 'type' => 'subject'], + ['name' => 'pcp_owner_notify', 'type' => 'text'], + ['name' => 'pcp_status_change', 'type' => 'subject'], + ['name' => 'pcp_supporter_notify', 'type' => 'html'], + ['name' => 'pcp_supporter_notify', 'type' => 'subject'], + ['name' => 'pcp_supporter_notify', 'type' => 'text'], + ['name' => 'petition_confirmation_needed', 'type' => 'html'], + ['name' => 'petition_confirmation_needed', 'type' => 'subject'], + ['name' => 'petition_confirmation_needed', 'type' => 'text'], + ['name' => 'petition_sign', 'type' => 'html'], + ['name' => 'petition_sign', 'type' => 'subject'], + ['name' => 'petition_sign', 'type' => 'text'], + ['name' => 'pledge_acknowledge', 'type' => 'subject'], + ['name' => 'pledge_acknowledge', 'type' => 'subject'], + ['name' => 'pledge_reminder', 'type' => 'html'], + ['name' => 'pledge_reminder', 'type' => 'subject'], + ['name' => 'pledge_reminder', 'type' => 'text'], + ['name' => 'uf_notify', 'type' => 'subject'], + ], + ], + ]; } diff --git a/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php b/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php index 67b81caae5..8ca6400909 100644 --- a/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php @@ -255,7 +255,7 @@ class CRM_Core_Payment_AuthorizeNetIPNTest extends CiviUnitTestCase { '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 @@ class CRM_Core_Payment_AuthorizeNetIPNTest extends CiviUnitTestCase { '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 @@ class CRM_Core_Payment_AuthorizeNetIPNTest extends CiviUnitTestCase { '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 @@ class CRM_Core_Payment_AuthorizeNetIPNTest extends CiviUnitTestCase { '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 c2637887ae..312ba71d1b 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 @@ - + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$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 16bf010402..a45c6df75a 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 f2b9d48842..14df6973eb 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}

@@ -62,4 +62,4 @@ - \ No newline at end of file + diff --git a/xml/templates/message_templates/contribution_recurring_billing_text.tpl b/xml/templates/message_templates/contribution_recurring_billing_text.tpl index 37e7ed7502..c71682e907 100644 --- a/xml/templates/message_templates/contribution_recurring_billing_text.tpl +++ b/xml/templates/message_templates/contribution_recurring_billing_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 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} @@ -20,4 +20,4 @@ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate} -{ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts} \ No newline at end of file +{ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts} diff --git a/xml/templates/message_templates/contribution_recurring_cancelled_html.tpl b/xml/templates/message_templates/contribution_recurring_cancelled_html.tpl index 674333e079..d04dd909a3 100644 --- a/xml/templates/message_templates/contribution_recurring_cancelled_html.tpl +++ b/xml/templates/message_templates/contribution_recurring_cancelled_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}Your recurring contribution of %1, every %2 %3 has been cancelled as requested.{/ts}

diff --git a/xml/templates/message_templates/contribution_recurring_cancelled_text.tpl b/xml/templates/message_templates/contribution_recurring_cancelled_text.tpl index f10d37432f..0b23d8eac0 100644 --- a/xml/templates/message_templates/contribution_recurring_cancelled_text.tpl +++ b/xml/templates/message_templates/contribution_recurring_cancelled_text.tpl @@ -1,3 +1,3 @@ -{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}Your recurring contribution of %1, every %2 %3 has been cancelled as requested.{/ts} diff --git a/xml/templates/message_templates/contribution_recurring_edit_html.tpl b/xml/templates/message_templates/contribution_recurring_edit_html.tpl index 0ef701f9c2..c1a9ae77ca 100644 --- a/xml/templates/message_templates/contribution_recurring_edit_html.tpl +++ b/xml/templates/message_templates/contribution_recurring_edit_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}Your recurring contribution has been updated as requested:{/ts}

{ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Recurring contribution is for %1, every %2 %3(s){/ts}{if $installments}{ts 1=$installments} for %1 installments{/ts}{/if}.

diff --git a/xml/templates/message_templates/contribution_recurring_edit_text.tpl b/xml/templates/message_templates/contribution_recurring_edit_text.tpl index b1e038b5da..af99606cd1 100644 --- a/xml/templates/message_templates/contribution_recurring_edit_text.tpl +++ b/xml/templates/message_templates/contribution_recurring_edit_text.tpl @@ -1,8 +1,8 @@ -{ts 1=$contact.display_name}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} {ts}Your recurring contribution has been updated as requested:{/ts} {ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Recurring contribution is for %1, every %2 %3(s){/ts} {if $installments}{ts 1=$installments} for %1 installments.{/ts}{/if} -{ts 1=$receipt_from_email}If you have questions please contact us at %1.{/ts} \ No newline at end of file +{ts 1=$receipt_from_email}If you have questions please contact us at %1.{/ts} diff --git a/xml/templates/message_templates/contribution_recurring_notify_html.tpl b/xml/templates/message_templates/contribution_recurring_notify_html.tpl index e2b0924835..201a5596f3 100644 --- a/xml/templates/message_templates/contribution_recurring_notify_html.tpl +++ b/xml/templates/message_templates/contribution_recurring_notify_html.tpl @@ -21,7 +21,7 @@ -

{ts 1=$displayName}Dear %1{/ts},

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

{$greeting},

{/if} diff --git a/xml/templates/message_templates/contribution_recurring_notify_text.tpl b/xml/templates/message_templates/contribution_recurring_notify_text.tpl index b0db9b5a31..19251cdba9 100644 --- a/xml/templates/message_templates/contribution_recurring_notify_text.tpl +++ b/xml/templates/message_templates/contribution_recurring_notify_text.tpl @@ -1,4 +1,4 @@ -{ts 1=$displayName}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} {if $recur_txnType eq 'START'} {if $auto_renew_membership} diff --git a/xml/templates/message_templates/event_registration_receipt_html.tpl b/xml/templates/message_templates/event_registration_receipt_html.tpl index e2026ab56d..810f995dd4 100644 --- a/xml/templates/message_templates/event_registration_receipt_html.tpl +++ b/xml/templates/message_templates/event_registration_receipt_html.tpl @@ -9,7 +9,7 @@ {capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture} {capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture} -

Dear {contact.display_name},

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

{$greeting},

{/if} {if $is_pay_later}

This is being sent to you as an acknowledgement that you have registered one or more members for the following workshop, event or purchase. Please note, however, that the status of your payment is pending, and the registration for this event will not be completed until your payment is received. @@ -27,7 +27,6 @@

Your order number is #{$transaction_id}. {if $line_items && !$is_refund} Information about the workshops will be sent separately to each participant.{/if} Here's a summary of your transaction placed on {$transaction_date|date_format:"%D %I:%M %p %Z"}:

- {if $billing_name} diff --git a/xml/templates/message_templates/event_registration_receipt_text.tpl b/xml/templates/message_templates/event_registration_receipt_text.tpl index f57ff600f4..8a58ea90c0 100644 --- a/xml/templates/message_templates/event_registration_receipt_text.tpl +++ b/xml/templates/message_templates/event_registration_receipt_text.tpl @@ -1,4 +1,5 @@ -Dear {contact.display_name}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} + {if $is_pay_later} This is being sent to you as an acknowledgement that you have registered one or more members for the following workshop, event or purchase. Please note, however, that the status of your payment is pending, and the registration for this event will not be completed until your payment is received. {else} diff --git a/xml/templates/message_templates/membership_autorenew_billing_html.tpl b/xml/templates/message_templates/membership_autorenew_billing_html.tpl index a8ec69f116..9ff740f8b7 100644 --- a/xml/templates/message_templates/membership_autorenew_billing_html.tpl +++ b/xml/templates/message_templates/membership_autorenew_billing_html.tpl @@ -21,7 +21,7 @@ diff --git a/xml/templates/message_templates/membership_autorenew_billing_text.tpl b/xml/templates/message_templates/membership_autorenew_billing_text.tpl index 8df337a3a2..dcd942971c 100644 --- a/xml/templates/message_templates/membership_autorenew_billing_text.tpl +++ b/xml/templates/message_templates/membership_autorenew_billing_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 1=$membershipType}Billing details for your automatically renewed %1 membership have been updated.{/ts} @@ -20,4 +20,4 @@ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate} -{ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts} \ No newline at end of file +{ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts} diff --git a/xml/templates/message_templates/membership_autorenew_cancelled_html.tpl b/xml/templates/message_templates/membership_autorenew_cancelled_html.tpl index 77e11ff632..a06f666d5d 100644 --- a/xml/templates/message_templates/membership_autorenew_cancelled_html.tpl +++ b/xml/templates/message_templates/membership_autorenew_cancelled_html.tpl @@ -21,7 +21,7 @@ diff --git a/xml/templates/message_templates/membership_autorenew_cancelled_text.tpl b/xml/templates/message_templates/membership_autorenew_cancelled_text.tpl index 51cec8cff6..15387b63de 100644 --- a/xml/templates/message_templates/membership_autorenew_cancelled_text.tpl +++ b/xml/templates/message_templates/membership_autorenew_cancelled_text.tpl @@ -1,3 +1,5 @@ +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} + {ts 1=$membershipType}The automatic renewal of your %1 membership has been cancelled as requested. This does not affect the status of your membership - you will receive a separate notification when your membership is up for renewal.{/ts} =========================================================== diff --git a/xml/templates/message_templates/membership_offline_receipt_html.tpl b/xml/templates/message_templates/membership_offline_receipt_html.tpl index b260a4a4fe..97d5089e13 100644 --- a/xml/templates/message_templates/membership_offline_receipt_html.tpl +++ b/xml/templates/message_templates/membership_offline_receipt_html.tpl @@ -21,6 +21,7 @@ diff --git a/xml/templates/message_templates/participant_cancelled_text.tpl b/xml/templates/message_templates/participant_cancelled_text.tpl index b4430b33d1..684983682f 100644 --- a/xml/templates/message_templates/participant_cancelled_text.tpl +++ b/xml/templates/message_templates/participant_cancelled_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}Your Event Registration has been cancelled.{/ts} diff --git a/xml/templates/message_templates/participant_confirm_html.tpl b/xml/templates/message_templates/participant_confirm_html.tpl index ca6816d166..e2e5e18a86 100644 --- a/xml/templates/message_templates/participant_confirm_html.tpl +++ b/xml/templates/message_templates/participant_confirm_html.tpl @@ -21,7 +21,7 @@ {if !$isAdditional and $participant.id} @@ -33,13 +33,13 @@ {/if} {if $event.allow_selfcancelxfer } - This event allows for self-cancel or transfer - {capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participantID`&{contact.checksum}" h=0 a=1 fe=1}{/capture} + {ts}This event allows for self-cancel or transfer{/ts} + {capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participantID`&{contact.checksum}" h=0 a=1 fe=1}{/capture} {ts}Self service cancel transfer{/ts} {/if} diff --git a/xml/templates/message_templates/participant_confirm_text.tpl b/xml/templates/message_templates/participant_confirm_text.tpl index e8f90132b5..dbadd74834 100644 --- a/xml/templates/message_templates/participant_confirm_text.tpl +++ b/xml/templates/message_templates/participant_confirm_text.tpl @@ -1,4 +1,5 @@ -{ts 1=$contact.display_name}Dear %1{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} + {if !$isAdditional and $participant.id} =========================================================== diff --git a/xml/templates/message_templates/participant_expired_html.tpl b/xml/templates/message_templates/participant_expired_html.tpl index a11ff72685..290a37cf24 100644 --- a/xml/templates/message_templates/participant_expired_html.tpl +++ b/xml/templates/message_templates/participant_expired_html.tpl @@ -21,7 +21,7 @@ diff --git a/xml/templates/message_templates/participant_transferred_text.tpl b/xml/templates/message_templates/participant_transferred_text.tpl index aeac8a7ba1..449594828e 100644 --- a/xml/templates/message_templates/participant_transferred_text.tpl +++ b/xml/templates/message_templates/participant_transferred_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 1=$to_participant}Your Event Registration has been transferred to %1.{/ts} diff --git a/xml/templates/message_templates/payment_or_refund_notification_html.tpl b/xml/templates/message_templates/payment_or_refund_notification_html.tpl index 6095b4d23f..ec62bbd324 100644 --- a/xml/templates/message_templates/payment_or_refund_notification_html.tpl +++ b/xml/templates/message_templates/payment_or_refund_notification_html.tpl @@ -20,9 +20,9 @@ - {if $emailGreeting}{/if} {/if} {if $isRefund}

{ts}A refund has been issued based on changes in your registration selections.{/ts}

{else} diff --git a/xml/templates/message_templates/payment_or_refund_notification_text.tpl b/xml/templates/message_templates/payment_or_refund_notification_text.tpl index 2f166dd3d4..348d8cbfea 100644 --- a/xml/templates/message_templates/payment_or_refund_notification_text.tpl +++ b/xml/templates/message_templates/payment_or_refund_notification_text.tpl @@ -1,5 +1,7 @@ {if $emailGreeting}{$emailGreeting}, -{/if}{if $isRefund} +{/if} + +{if $isRefund} {ts}A refund has been issued based on changes in your registration selections.{/ts} {else} {ts}A payment has been received.{/ts} diff --git a/xml/templates/message_templates/pcp_owner_notify_html.tpl b/xml/templates/message_templates/pcp_owner_notify_html.tpl index 9e4b6d29d6..6ceb77c35a 100644 --- a/xml/templates/message_templates/pcp_owner_notify_html.tpl +++ b/xml/templates/message_templates/pcp_owner_notify_html.tpl @@ -10,6 +10,7 @@ {capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture} {capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture} + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if}

{ts}You have received a donation at your personal page{/ts}: {$page_title}

{ts}Your fundraising total has been updated.{/ts}
{ts}The donor's information is listed below. You can choose to contact them and convey your thanks if you wish.{/ts}
diff --git a/xml/templates/message_templates/pcp_owner_notify_text.tpl b/xml/templates/message_templates/pcp_owner_notify_text.tpl index 4c7f7841af..964eabff62 100644 --- a/xml/templates/message_templates/pcp_owner_notify_text.tpl +++ b/xml/templates/message_templates/pcp_owner_notify_text.tpl @@ -2,6 +2,8 @@ {ts}Personal Campaign Page Owner Notification{/ts} =========================================================== +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} + {ts}You have received a donation at your personal page{/ts}: {$page_title} >> {$pcpInfoURL} diff --git a/xml/templates/message_templates/pcp_supporter_notify_html.tpl b/xml/templates/message_templates/pcp_supporter_notify_html.tpl index d0e429b5cb..a3e2c389e5 100644 --- a/xml/templates/message_templates/pcp_supporter_notify_html.tpl +++ b/xml/templates/message_templates/pcp_supporter_notify_html.tpl @@ -21,7 +21,7 @@

diff --git a/xml/templates/message_templates/pcp_supporter_notify_text.tpl b/xml/templates/message_templates/pcp_supporter_notify_text.tpl index 6f00d5cc0d..872ce3f277 100644 --- a/xml/templates/message_templates/pcp_supporter_notify_text.tpl +++ b/xml/templates/message_templates/pcp_supporter_notify_text.tpl @@ -1,4 +1,5 @@ -{ts}Dear supporter{/ts}, +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} + {ts 1="$contribPageTitle"}Thanks for creating a personal campaign page in support of %1.{/ts} {if $pcpStatus eq 'Approved'} diff --git a/xml/templates/message_templates/petition_confirmation_needed_html.tpl b/xml/templates/message_templates/petition_confirmation_needed_html.tpl index 2d30dc11c7..657000a8e6 100644 --- a/xml/templates/message_templates/petition_confirmation_needed_html.tpl +++ b/xml/templates/message_templates/petition_confirmation_needed_html.tpl @@ -1,3 +1,5 @@ +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if} +

Thank you for signing {$petition.title}.

In order to complete your signature, we must confirm your e-mail. diff --git a/xml/templates/message_templates/petition_confirmation_needed_text.tpl b/xml/templates/message_templates/petition_confirmation_needed_text.tpl index 8549b39b4c..1bf5583ac1 100644 --- a/xml/templates/message_templates/petition_confirmation_needed_text.tpl +++ b/xml/templates/message_templates/petition_confirmation_needed_text.tpl @@ -1,3 +1,5 @@ +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} + Thank you for signing {$petition.title}. In order to complete your signature, we must confirm your e-mail. diff --git a/xml/templates/message_templates/petition_sign_html.tpl b/xml/templates/message_templates/petition_sign_html.tpl index 6dfbaab34d..386527c9b6 100644 --- a/xml/templates/message_templates/petition_sign_html.tpl +++ b/xml/templates/message_templates/petition_sign_html.tpl @@ -1,3 +1,5 @@ +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}

{$greeting},

{/if} +

Thank you for signing {$petition.title}.

{include file="CRM/Campaign/Page/Petition/SocialNetwork.tpl" petition_id=$survey_id noscript=true emailMode=true} diff --git a/xml/templates/message_templates/petition_sign_text.tpl b/xml/templates/message_templates/petition_sign_text.tpl index 8e8a555dfb..f95137e869 100644 --- a/xml/templates/message_templates/petition_sign_text.tpl +++ b/xml/templates/message_templates/petition_sign_text.tpl @@ -1 +1,3 @@ +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} + Thank you for signing {$petition.title}. diff --git a/xml/templates/message_templates/pledge_reminder_html.tpl b/xml/templates/message_templates/pledge_reminder_html.tpl index c2e42a5774..f59fd86f4b 100644 --- a/xml/templates/message_templates/pledge_reminder_html.tpl +++ b/xml/templates/message_templates/pledge_reminder_html.tpl @@ -21,7 +21,7 @@ diff --git a/xml/templates/message_templates/pledge_reminder_text.tpl b/xml/templates/message_templates/pledge_reminder_text.tpl index 2761c3d36a..6ff194224f 100644 --- a/xml/templates/message_templates/pledge_reminder_text.tpl +++ b/xml/templates/message_templates/pledge_reminder_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 1=$next_payment|truncate:10:''|crmDate}This is a reminder that the next payment on your pledge is due on %1.{/ts} -- 2.25.1
-

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

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

{$greeting},

{/if}

{ts 1=$membershipType}Billing details for your automatically renewed %1 membership have been updated.{/ts}

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

{$greeting},

{/if}

{ts 1=$membershipType}The automatic renewal of your %1 membership has been cancelled as requested. This does not affect the status of your membership - you will receive a separate notification when your membership is up for renewal.{/ts}

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

{$greeting},

{/if} {if $formValues.receipt_text_signup}

{$formValues.receipt_text_signup|htmlize}

{elseif $formValues.receipt_text_renewal} diff --git a/xml/templates/message_templates/membership_offline_receipt_text.tpl b/xml/templates/message_templates/membership_offline_receipt_text.tpl index 3e64d34aa8..4ae65ed9dc 100644 --- a/xml/templates/message_templates/membership_offline_receipt_text.tpl +++ b/xml/templates/message_templates/membership_offline_receipt_text.tpl @@ -1,3 +1,5 @@ +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} + {if $formValues.receipt_text_signup} {$formValues.receipt_text_signup} {elseif $formValues.receipt_text_renewal} diff --git a/xml/templates/message_templates/participant_cancelled_html.tpl b/xml/templates/message_templates/participant_cancelled_html.tpl index 4a882c1259..062f610cb7 100644 --- a/xml/templates/message_templates/participant_cancelled_html.tpl +++ b/xml/templates/message_templates/participant_cancelled_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}Your Event Registration has been cancelled.{/ts}

-

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

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

{$greeting},

{/if}
{capture assign=confirmUrl}{crmURL p='civicrm/event/confirm' q="reset=1&participantId=`$participant.id`&cs=`$checksumValue`" a=true h=0 fe=1}{/capture} - Go to a web page where you can confirm your registration online + {ts}Go to a web page where you can confirm your registration online{/ts}
-

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

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

{$greeting},

{/if}

{ts 1=$event.event_title}Your pending event registration for %1 has expired because you did not confirm your registration.{/ts}

{ts 1=$domain.phone 2=$domain.email}Please contact us at %1 or send email to %2 if you have questions diff --git a/xml/templates/message_templates/participant_expired_text.tpl b/xml/templates/message_templates/participant_expired_text.tpl index be649c11da..56acebfb5f 100644 --- a/xml/templates/message_templates/participant_expired_text.tpl +++ b/xml/templates/message_templates/participant_expired_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 1=$event.event_title}Your pending event registration for %1 has expired because you did not confirm your registration.{/ts} diff --git a/xml/templates/message_templates/participant_transferred_html.tpl b/xml/templates/message_templates/participant_transferred_html.tpl index 26cbf37e15..9a21f1b010 100644 --- a/xml/templates/message_templates/participant_transferred_html.tpl +++ b/xml/templates/message_templates/participant_transferred_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=$to_participant}Your Event Registration has been Transferred to %1.{/ts}

{$emailGreeting},
+ {if $emailGreeting}
{$emailGreeting},
-

{ts}Dear supporter{/ts},

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

{$greeting},

{/if}

{ts 1="$contribPageTitle"}Thanks for creating a personal campaign page in support of %1.{/ts}

-

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

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

{$greeting},

{/if}

{ts 1=$next_payment|truncate:10:''|crmDate}This is a reminder that the next payment on your pledge is due on %1.{/ts}