diff --git a/CRM/Upgrade/Incremental/MessageTemplates.php b/CRM/Upgrade/Incremental/MessageTemplates.php index 35db89aaf868d63dd888c3f41e6d0b8963647930..a78a0aef3638509f4bcf45efb17b00553553924e 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 67b81caae58820ca14b38b00101ccc0811227dea..8ca6400909828d280851d7a8cfd7b7b2c4103ffa 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 c2637887aed9897bcbe56736a0e9887227395219..312ba71d1ba46f94ec6ce6459ab46b03ee77dea6 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 @@ <tr> <td> - + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} {if $formValues.receipt_text} <p>{$formValues.receipt_text|htmlize}</p> {else} diff --git a/xml/templates/message_templates/contribution_offline_receipt_text.tpl b/xml/templates/message_templates/contribution_offline_receipt_text.tpl index 16bf010402fc6e340cd2c5c41c8d358ad15b4335..a45c6df75a912cb02151a7dbb70b2c5ee7f56cbc 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 f2b9d48842391578f8bc0d227c5260e4755200a3..14df6973eb56b45324bde4f1b4b651142e0bd001 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 @@ <tr> <td> - <p>{ts 1=$contact.display_name}Dear %1{/ts},</p> + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} <p>{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}</p> </td> </tr> @@ -62,4 +62,4 @@ </center> </body> -</html> \ No newline at end of file +</html> diff --git a/xml/templates/message_templates/contribution_recurring_billing_text.tpl b/xml/templates/message_templates/contribution_recurring_billing_text.tpl index 37e7ed750216569cc92de18eb8e30193216ee9a2..c71682e9074ec6d076492de24e23333a1ac5fd61 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 674333e079fbbc187d8ef2cb67bf8d3e9a52981e..d04dd909a3be470d55ff47dcfb668030aa600bd2 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 @@ <tr> <td> - <p>{ts 1=$contact.display_name}Dear %1{/ts},</p> + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} <p>{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}</p> </td> </tr> diff --git a/xml/templates/message_templates/contribution_recurring_cancelled_text.tpl b/xml/templates/message_templates/contribution_recurring_cancelled_text.tpl index f10d37432f5cf5b58a237517b492abe408bde914..0b23d8eac01371429462603b4f71422df76debf7 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 0ef701f9c28b3dea9d20a0761674718caafcdfda..c1a9ae77ca12094c16c22b1efac060f08ad7a88d 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 @@ <tr> <td> - <p>{ts 1=$contact.display_name}Dear %1{/ts},</p> + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} <p>{ts}Your recurring contribution has been updated as requested:{/ts} <p>{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}.</p> diff --git a/xml/templates/message_templates/contribution_recurring_edit_text.tpl b/xml/templates/message_templates/contribution_recurring_edit_text.tpl index b1e038b5da3dbcae019c59b4b7545a51e3eaccef..af99606cd180bdbb8d804b4cfe82db897584e9d4 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 e2b09248355aa69116e67dbdc40b35f7aa013181..201a5596f39849e251226b1171814b1bfc4bf83e 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 @@ <tr> <td> - <p>{ts 1=$displayName}Dear %1{/ts},</p> + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} </td> </tr> diff --git a/xml/templates/message_templates/contribution_recurring_notify_text.tpl b/xml/templates/message_templates/contribution_recurring_notify_text.tpl index b0db9b5a31d203de3333e1773bcfd468f6f43ceb..19251cdba9183d25446869c13a89912807da5152 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 e2026ab56da08e469b288a378ea22680d9701249..810f995dd4a19c39b5f98679f074cde2288ec05b 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} - <p>Dear {contact.display_name},</p> + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} {if $is_pay_later} <p> 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 @@ <p>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"}:</p> - {if $billing_name} <table class="billing-info"> <tr> diff --git a/xml/templates/message_templates/event_registration_receipt_text.tpl b/xml/templates/message_templates/event_registration_receipt_text.tpl index f57ff600f4075eb48f6dd52b9c104ef8e2cc2a12..8a58ea90c0fb88426d96b1c731a8d0354b8038e2 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 a8ec69f11623ee3b10e87810029832ec2e3290b8..9ff740f8b7d06ec9a39d3ce496888a4586d6f0e8 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 @@ <tr> <td> - <p>{ts 1=$contact.display_name}Dear %1{/ts},</p> + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} <p>{ts 1=$membershipType}Billing details for your automatically renewed %1 membership have been updated.{/ts}</p> </td> </tr> diff --git a/xml/templates/message_templates/membership_autorenew_billing_text.tpl b/xml/templates/message_templates/membership_autorenew_billing_text.tpl index 8df337a3a21bb9e631653c9bfef91f3d72c05505..dcd942971c9e15cf76cd09347cc820b102608859 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 77e11ff632f1d268e7a4eae3d142bba096ce2140..a06f666d5daa8ea8f92cee38ad6812aeb3d1bd25 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 @@ <tr> <td> - + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} <p>{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}</p> </td> diff --git a/xml/templates/message_templates/membership_autorenew_cancelled_text.tpl b/xml/templates/message_templates/membership_autorenew_cancelled_text.tpl index 51cec8cff6a71e0a2a37bbafe1d59123facfccf7..15387b63decd7dae1627e47c493bf6d4536c5acf 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 b260a4a4fe7958b143ccc20f446f127a78f3ac41..97d5089e13ba485553e6f04125805574bafd3df7 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 @@ <tr> <td> + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} {if $formValues.receipt_text_signup} <p>{$formValues.receipt_text_signup|htmlize}</p> {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 3e64d34aa8ebbfb3d11b60873a38c8a071bacdc5..4ae65ed9dce3787d99c80f34aa0c5a70ffe5ed67 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 4a882c1259b3ffafc0689510ab80a1ca95556d25..062f610cb7d2e798d0a6f74b5b65cae56d867196 100644 --- a/xml/templates/message_templates/participant_cancelled_html.tpl +++ b/xml/templates/message_templates/participant_cancelled_html.tpl @@ -21,7 +21,7 @@ <tr> <td> - <p>{ts 1=$contact.display_name}Dear %1{/ts},</p> + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} <p>{ts}Your Event Registration has been cancelled.{/ts}</p> </td> </tr> diff --git a/xml/templates/message_templates/participant_cancelled_text.tpl b/xml/templates/message_templates/participant_cancelled_text.tpl index b4430b33d19437bf5f9f81541aec0df07298df97..684983682f1e6c72049ec90a18df719ba3e700c2 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 ca6816d166f356b170afde10b4101951e6500e64..e2e5e18a86f83cd57771faa8c4b9c1159a53d54e 100644 --- a/xml/templates/message_templates/participant_confirm_html.tpl +++ b/xml/templates/message_templates/participant_confirm_html.tpl @@ -21,7 +21,7 @@ <tr> <td> - <p>{ts 1=$contact.display_name}Dear %1{/ts},</p> + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} </td> </tr> {if !$isAdditional and $participant.id} @@ -33,13 +33,13 @@ <tr> <td colspan="2" {$valueStyle}> {capture assign=confirmUrl}{crmURL p='civicrm/event/confirm' q="reset=1&participantId=`$participant.id`&cs=`$checksumValue`" a=true h=0 fe=1}{/capture} - <a href="{$confirmUrl}">Go to a web page where you can confirm your registration online</a> + <a href="{$confirmUrl}">{ts}Go to a web page where you can confirm your registration online{/ts}</a> </td> </tr> {/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} <a href="{$selfService}">{ts}Self service cancel transfer{/ts}</a> {/if} diff --git a/xml/templates/message_templates/participant_confirm_text.tpl b/xml/templates/message_templates/participant_confirm_text.tpl index e8f90132b5c11c86825cde4be295473472ef0946..dbadd748349a62c264a58bdfeaa1bf56ffec0522 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 a11ff72685cfede07dcb6f603e31f72184dd7e6f..290a37cf2466c92abf94225ded726627b721c314 100644 --- a/xml/templates/message_templates/participant_expired_html.tpl +++ b/xml/templates/message_templates/participant_expired_html.tpl @@ -21,7 +21,7 @@ <tr> <td> - <p>{ts 1=$contact.display_name}Dear %1{/ts},</p> + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} <p>{ts 1=$event.event_title}Your pending event registration for %1 has expired because you did not confirm your registration.{/ts}</p> <p>{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 be649c11daee52728357834f9184b820c98e9b20..56acebfb5f141ba1190ceee584020eced1c46bb2 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 26cbf37e1524c454e1cdc2196220591e62353fe0..9a21f1b010de8e70e5b67a7838f45e4eefe7f01c 100644 --- a/xml/templates/message_templates/participant_transferred_html.tpl +++ b/xml/templates/message_templates/participant_transferred_html.tpl @@ -21,7 +21,7 @@ <tr> <td> - <p>{ts 1=$contact.display_name}Dear %1{/ts},</p> + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} <p>{ts 1=$to_participant}Your Event Registration has been Transferred to %1.{/ts}</p> </td> </tr> diff --git a/xml/templates/message_templates/participant_transferred_text.tpl b/xml/templates/message_templates/participant_transferred_text.tpl index aeac8a7ba15952a8a7937ba2c184029e6d65bfb1..449594828ee47f4d0424388567c3e4ef4d355665 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 6095b4d23fec06f7f223647494675c56a4d5fa90..ec62bbd3246e7466596101d73281f784c6661f24 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 @@ <!-- END HEADER --> <!-- BEGIN CONTENT --> - {if $emailGreeting}<tr><td>{$emailGreeting},</td></tr>{/if} <tr> <td> + {if $emailGreeting}<tr><td>{$emailGreeting},</td></tr>{/if} {if $isRefund} <p>{ts}A refund has been issued based on changes in your registration selections.{/ts}</p> {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 2f166dd3d44b4abc5f4cc56df8c58fcca955e6bd..348d8cbfeadfe480248a7a463d6b2063d00c60a9 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 9e4b6d29d66cb514b6ed368241ecb4c30d5dc609..6ceb77c35a33d38ca7fe0c2213af9a3a23a1a393 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}<p>{$greeting},</p>{/if} <p>{ts}You have received a donation at your personal page{/ts}: <a href="{$pcpInfoURL}">{$page_title}</a></p> <p>{ts}Your fundraising total has been updated.{/ts}<br/> {ts}The donor's information is listed below. You can choose to contact them and convey your thanks if you wish.{/ts} <br/> diff --git a/xml/templates/message_templates/pcp_owner_notify_text.tpl b/xml/templates/message_templates/pcp_owner_notify_text.tpl index 4c7f7841afc62385dbccb70149426758e4511e87..964eabff6221eb8b780c8bb6dc6d4cf1bf58b2c9 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 d0e429b5cba53afd41df7b2566341695a8445dfa..a3e2c389e57dd3eeb2ed658af88fb5ae7a774c4b 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 @@ <tr> <td> - <p>{ts}Dear supporter{/ts},</p> + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} <p>{ts 1="$contribPageTitle"}Thanks for creating a personal campaign page in support of %1.{/ts}</p> </td> </tr> diff --git a/xml/templates/message_templates/pcp_supporter_notify_text.tpl b/xml/templates/message_templates/pcp_supporter_notify_text.tpl index 6f00d5cc0dad8c8529ecc682dd6230d629b7e773..872ce3f2776fa05eff27543fe812ef4fef8887f1 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 2d30dc11c79d99d58938c9342e725e7f2909edf6..657000a8e60974534b7b7c902c037fd694e7849c 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}<p>{$greeting},</p>{/if} + <p>Thank you for signing {$petition.title}.</p> <p>In order to <b>complete your signature</b>, 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 8549b39b4c41d3544a1d04a508bfcf2ad0d20445..1bf5583ac1aa06fd770deb3e45c889ebe6f2c2c1 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 6dfbaab34d573612d761067685b18d38890dbfd7..386527c9b668dbf58aca4cfb947887400a72780b 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}<p>{$greeting},</p>{/if} + <p>Thank you for signing {$petition.title}.</p> {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 8e8a555dfbf3835c9420ac548691550e54f52851..f95137e86996378bde9a3475034aa2b1ffe0eb05 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 c2e42a57748e6068d924f47fdfc600ee0b021fa0..f59fd86f4ba153bdcf4c6ad06fb92c232c04ff45 100644 --- a/xml/templates/message_templates/pledge_reminder_html.tpl +++ b/xml/templates/message_templates/pledge_reminder_html.tpl @@ -21,7 +21,7 @@ <tr> <td> - <p>{ts 1=$contact.display_name}Dear %1{/ts},</p> + {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} <p>{ts 1=$next_payment|truncate:10:''|crmDate}This is a reminder that the next payment on your pledge is due on %1.{/ts}</p> </td> </tr> diff --git a/xml/templates/message_templates/pledge_reminder_text.tpl b/xml/templates/message_templates/pledge_reminder_text.tpl index 2761c3d36ac8ddc326e14b2f316320aaa25c62dd..6ff194224f216fbaaa75ff9c978cbed802bc3d79 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}