From db3e7cb155836cbae87aba0493fa9c241a7692f9 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/Event/BAO/Event.php | 1 + CRM/Event/Form/Registration/Confirm.php | 1 - CRM/Financial/BAO/Payment.php | 30 +-- CRM/Upgrade/Incremental/MessageTemplates.php | 79 ++++++ api/v3/Contact.php | 2 +- release-notes.md | 18 ++ release-notes/5.19.0.md | 241 ++++++++++++++++++ .../CRM/Event/Form/Registration/Confirm.tpl | 2 +- .../CRM/Event/Form/Registration/ThankYou.tpl | 2 +- .../Event/Form/Registration/ConfirmTest.php | 31 ++- tests/phpunit/CiviTest/CiviUnitTestCase.php | 16 +- .../event_online_receipt_text.tpl | 73 ++++++ .../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_online_receipt_html.tpl | 4 +- .../event_online_receipt_text.tpl | 5 +- .../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 +- 52 files changed, 527 insertions(+), 72 deletions(-) create mode 100644 release-notes/5.19.0.md create mode 100644 tests/templates/message_templates/event_online_receipt_text.tpl diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index 87c08b579a48..313aca056903 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -1172,6 +1172,7 @@ public static function sendMail($contactID, $values, $participantId, $isTest = F 'customPost' => $profilePost[0], 'customPost_grouptitle' => $customPostTitles, 'participantID' => $participantId, + 'contactID' => $contactID, 'conference_sessions' => $sessions, 'credit_card_number' => CRM_Utils_System::mungeCreditCard(CRM_Utils_Array::value('credit_card_number', $participantParams)), 'credit_card_exp_date' => CRM_Utils_Date::mysqlToIso(CRM_Utils_Date::format(CRM_Utils_Array::value('credit_card_exp_date', $participantParams))), diff --git a/CRM/Event/Form/Registration/Confirm.php b/CRM/Event/Form/Registration/Confirm.php index 8a326a4cf2af..bf4542866be6 100644 --- a/CRM/Event/Form/Registration/Confirm.php +++ b/CRM/Event/Form/Registration/Confirm.php @@ -915,7 +915,6 @@ public function postProcess() { $this->_values['params']['isRequireApproval'] = $this->_requireApproval; //send mail to primary as well as additional participants. - $this->assign('contactID', $contactId); CRM_Event_BAO_Event::sendMail($contactId, $this->_values, $participantID, $isTest); } } diff --git a/CRM/Financial/BAO/Payment.php b/CRM/Financial/BAO/Payment.php index ccc65c2dd832..998f8af44c13 100644 --- a/CRM/Financial/BAO/Payment.php +++ b/CRM/Financial/BAO/Payment.php @@ -60,27 +60,27 @@ public static function create($params) { $isPaymentCompletesContribution = self::isPaymentCompletesContribution($params['contribution_id'], $params['total_amount']); if ($params['total_amount'] > 0) { - $balanceTrxnParams['to_financial_account_id'] = CRM_Contribute_BAO_Contribution::getToFinancialAccount($contribution, $params); - $balanceTrxnParams['from_financial_account_id'] = CRM_Financial_BAO_FinancialAccount::getFinancialAccountForFinancialTypeByRelationship($contribution['financial_type_id'], 'Accounts Receivable Account is'); - $balanceTrxnParams['total_amount'] = $params['total_amount']; - $balanceTrxnParams['contribution_id'] = $params['contribution_id']; - $balanceTrxnParams['trxn_date'] = CRM_Utils_Array::value('trxn_date', $params, CRM_Utils_Array::value('contribution_receive_date', $params, date('YmdHis'))); - $balanceTrxnParams['fee_amount'] = CRM_Utils_Array::value('fee_amount', $params); - $balanceTrxnParams['net_amount'] = CRM_Utils_Array::value('total_amount', $params); - $balanceTrxnParams['currency'] = $contribution['currency']; - $balanceTrxnParams['trxn_id'] = CRM_Utils_Array::value('contribution_trxn_id', $params, NULL); - $balanceTrxnParams['status_id'] = CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_FinancialTrxn', 'status_id', 'Completed'); - $balanceTrxnParams['payment_instrument_id'] = CRM_Utils_Array::value('payment_instrument_id', $params, $contribution['payment_instrument_id']); - $balanceTrxnParams['check_number'] = CRM_Utils_Array::value('check_number', $params); - $balanceTrxnParams['is_payment'] = 1; + $paymentTrxnParams['to_financial_account_id'] = CRM_Contribute_BAO_Contribution::getToFinancialAccount($contribution, $params); + $paymentTrxnParams['from_financial_account_id'] = CRM_Financial_BAO_FinancialAccount::getFinancialAccountForFinancialTypeByRelationship($contribution['financial_type_id'], 'Accounts Receivable Account is'); + $paymentTrxnParams['total_amount'] = $params['total_amount']; + $paymentTrxnParams['contribution_id'] = $params['contribution_id']; + $paymentTrxnParams['trxn_date'] = CRM_Utils_Array::value('trxn_date', $params, CRM_Utils_Array::value('contribution_receive_date', $params, date('YmdHis'))); + $paymentTrxnParams['fee_amount'] = CRM_Utils_Array::value('fee_amount', $params); + $paymentTrxnParams['net_amount'] = CRM_Utils_Array::value('total_amount', $params); + $paymentTrxnParams['currency'] = $contribution['currency']; + $paymentTrxnParams['trxn_id'] = CRM_Utils_Array::value('contribution_trxn_id', $params, NULL); + $paymentTrxnParams['status_id'] = CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_FinancialTrxn', 'status_id', 'Completed'); + $paymentTrxnParams['payment_instrument_id'] = CRM_Utils_Array::value('payment_instrument_id', $params, $contribution['payment_instrument_id']); + $paymentTrxnParams['check_number'] = CRM_Utils_Array::value('check_number', $params); + $paymentTrxnParams['is_payment'] = 1; if (!empty($params['payment_processor'])) { // I can't find evidence this is passed in - I was gonna just remove it but decided to deprecate as I see getToFinancialAccount // also anticipates it. CRM_Core_Error::deprecatedFunctionWarning('passing payment_processor is deprecated - use payment_processor_id'); - $balanceTrxnParams['payment_processor_id'] = $params['payment_processor']; + $paymentTrxnParams['payment_processor_id'] = $params['payment_processor']; } - $trxn = CRM_Core_BAO_FinancialTrxn::create($balanceTrxnParams); + $trxn = CRM_Core_BAO_FinancialTrxn::create($paymentTrxnParams); // @todo - this is just weird & historical & inconsistent - why 2 tracks? if (!empty($params['line_item']) && !empty($trxn)) { diff --git a/CRM/Upgrade/Incremental/MessageTemplates.php b/CRM/Upgrade/Incremental/MessageTemplates.php index 35db89aaf868..a78a0aef3638 100644 --- a/CRM/Upgrade/Incremental/MessageTemplates.php +++ b/CRM/Upgrade/Incremental/MessageTemplates.php @@ -121,6 +121,85 @@ protected function getTemplateUpdates() { ['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/api/v3/Contact.php b/api/v3/Contact.php index bcaa9954cc8b..200605bdc87b 100644 --- a/api/v3/Contact.php +++ b/api/v3/Contact.php @@ -1195,7 +1195,7 @@ function _civicrm_api3_contact_merge_spec(&$params) { $params['mode'] = [ 'title' => ts('Dedupe mode'), 'description' => ts("In 'safe' mode conflicts will result in no merge. In 'aggressive' mode the merge will still proceed (hook dependent)"), - 'api.default' => ['safe', 'aggressive'], + 'api.default' => 'safe', 'options' => ['safe' => ts('Abort on unhandled conflict'), 'aggressive' => ts('Proceed on unhandled conflict. Note hooks may change handling here.')], ]; } diff --git a/release-notes.md b/release-notes.md index 7534552e0a46..33d475ea6981 100644 --- a/release-notes.md +++ b/release-notes.md @@ -15,6 +15,22 @@ Other resources for identifying changes are: * https://github.com/civicrm/civicrm-joomla * https://github.com/civicrm/civicrm-wordpress +<<<<<<< HEAD + +======= +>>>>>>> b3172becb1... 5.19.0 release notes: added boilerplate +## CiviCRM 5.19.0 + +Released November 6, 2019 + +- **[Synopsis](release-notes/5.19.0.md#synopsis)** +- **[Features](release-notes/5.19.0.md#features)** +- **[Bugs resolved](release-notes/5.19.0.md#bugs)** +- **[Miscellany](release-notes/5.19.0.md#misc)** +- **[Credits](release-notes/5.19.0.md#credits)** +- **[Feedback](release-notes/5.19.0.md#feedback)** + +<<<<<<< HEAD ## CiviCRM 5.18.3 Released October 15, 2019 @@ -24,6 +40,8 @@ Released October 15, 2019 - **[Credits](release-notes/5.18.3.md#credits)** - **[Feedback](release-notes/5.18.3.md#feedback)** +======= +>>>>>>> b3172becb1... 5.19.0 release notes: added boilerplate ## CiviCRM 5.18.2 Released October 9, 2019 diff --git a/release-notes/5.19.0.md b/release-notes/5.19.0.md new file mode 100644 index 000000000000..c928eef4ab99 --- /dev/null +++ b/release-notes/5.19.0.md @@ -0,0 +1,241 @@ +# CiviCRM 5.19.0 + +Released November 6, 2019 + +- **[Synopsis](#synopsis)** +- **[Features](#features)** +- **[Bugs resolved](#bugs)** +- **[Miscellany](#misc)** +- **[Credits](#credits)** +- **[Feedback](#feedback)** + +## Synopsis + +| *Does this version...?* | | +|:--------------------------------------------------------------- |:-------:| +| Fix security vulnerabilities? | | +| Change the database schema? | | +| Alter the API? | | +| Require attention to configuration options? | | +| Fix problems installing or upgrading to a previous version? | | +| Introduce features? | | +| Fix bugs? | | + +## Features + +### Core CiviCRM + +- **CRM-21677 Missing Summary ([15230](https://github.com/civicrm/civicrm-core/pull/15230))** + +- **CRM-21777 Missing Summary ([15305](https://github.com/civicrm/civicrm-core/pull/15305))** + +- **crm- Missing Summary ([15309](https://github.com/civicrm/civicrm-core/pull/15309))** + +## Bugs resolved + +### Core CiviCRM + +- **dev/financial#69 Fix misrecording of payments against non pay_later Pending contribution. ([15502](https://github.com/civicrm/civicrm-core/pull/15502))** + +- **Do not check for the extension we are trying to download itself ([15506](https://github.com/civicrm/civicrm-core/pull/15506))** + +- **Check requirements before upgrading extensions via the UI ([15450](https://github.com/civicrm/civicrm-core/pull/15450))** + +- **Fix 5.18 regression on membership handling ([15494](https://github.com/civicrm/civicrm-core/pull/15494))** + +- **5.18.2 release notes ([15464](https://github.com/civicrm/civicrm-core/pull/15464))** + +- **dev/core#1285 import support for campaign_id (& other fields where it could be an id, a name or a label. ([15453](https://github.com/civicrm/civicrm-core/pull/15453))** + +- **dev/core#1305 - fieldspec bao not defined for custom fields ([15454](https://github.com/civicrm/civicrm-core/pull/15454))** + +- **dev/core#1302 fix regression on exported when merging addresses with specified fields ([15443](https://github.com/civicrm/civicrm-core/pull/15443))** + +- **dev/core#1269 Add in fix for undefined index bao in parsePseudoConst… ([15447](https://github.com/civicrm/civicrm-core/pull/15447))** + +- **dev/core#1293 Fix regression on export filtering for postal address only ([15439](https://github.com/civicrm/civicrm-core/pull/15439))** + +- **dev/core#1293 Still output csv file on export, even if no rows are in it ([15440](https://github.com/civicrm/civicrm-core/pull/15440))** + +- **Fix status check not rendering before 5.19 migrations ([15428](https://github.com/civicrm/civicrm-core/pull/15428))** + +- **dev/core#1281 fix e-notice on isLiveMode ([15420](https://github.com/civicrm/civicrm-core/pull/15420))** + +- **Add trxn_id as a parameter on Payment.get ([15417](https://github.com/civicrm/civicrm-core/pull/15417))** + +- **dev/core#1283 fix inability to export more than 255 chars ([15414](https://github.com/civicrm/civicrm-core/pull/15414))** + +- **Update fix - should not be localisable ([15416](https://github.com/civicrm/civicrm-core/pull/15416))** + +- **Add test for uF group one bug ([15381](https://github.com/civicrm/civicrm-core/pull/15381))** + +- **dev/core#1295 Add is_active field to civicrm_status_preference ([15409](https://github.com/civicrm/civicrm-core/pull/15409))** + +- **[REF] don't handle non-array, pass by reference ([15413](https://github.com/civicrm/civicrm-core/pull/15413))** + +- **Improve obsolete extension management ([15352](https://github.com/civicrm/civicrm-core/pull/15352))** + +- **dev/core#861 Ensure that when processing mailings that no emails are … ([15404](https://github.com/civicrm/civicrm-core/pull/15404))** + +- **Remove call to updateRecurMembership which is handled by Membership::create BAO ([15384](https://github.com/civicrm/civicrm-core/pull/15384))** + +- **Fix checking of isSubscriptionCancelled when label is changed ([15406](https://github.com/civicrm/civicrm-core/pull/15406))** + +- **Remove legacy Yahoo references from the Mapping/Geocoding settings/code. ([15405](https://github.com/civicrm/civicrm-core/pull/15405))** + +- **Fix height of select2 box (appears squished) ([15403](https://github.com/civicrm/civicrm-core/pull/15403))** + +- **Allow columns in relationship table to be modified by searchColumns hook ([14184](https://github.com/civicrm/civicrm-core/pull/14184))** + +- **REF Explicitly specify params so we can find problems with comparing translated labels ([15397](https://github.com/civicrm/civicrm-core/pull/15397))** + +- **REF Remove some duplication in CRM_Utils_Type::escape/validate ([14577](https://github.com/civicrm/civicrm-core/pull/14577))** + +- **[NFC] code formatting & exceptions in doc blocks ([15402](https://github.com/civicrm/civicrm-core/pull/15402))** + +- **Master / 5.19 version of #15392 ([15401](https://github.com/civicrm/civicrm-core/pull/15401))** + +- **5 18 1 release notes ([15395](https://github.com/civicrm/civicrm-core/pull/15395))** + +- **dev/core#1294 Remove getFormValues function ([15398](https://github.com/civicrm/civicrm-core/pull/15398))** + +- **Don't use random parameters to detect if we should create MembershipPayment ([14897](https://github.com/civicrm/civicrm-core/pull/14897))** + +- **[TEST] dev/core#1046 - tests for case type edit screen ([15385](https://github.com/civicrm/civicrm-core/pull/15385))** + +- **Extract the code to get the field name. ([15389](https://github.com/civicrm/civicrm-core/pull/15389))** + +- **Use name instead of label to check contribution status ([15376](https://github.com/civicrm/civicrm-core/pull/15376))** + +- **[REF] Pull out anonymous javascript function to make it testable ([15378](https://github.com/civicrm/civicrm-core/pull/15378))** + +- **Remove static caching of static on Contribution page tab ([15329](https://github.com/civicrm/civicrm-core/pull/15329))** + +- **financial#71 - allow emailing partially paid invoices ([15388](https://github.com/civicrm/civicrm-core/pull/15388))** + +- **[REF] Consolidate getFormValues on contribution search ([15379](https://github.com/civicrm/civicrm-core/pull/15379))** + +- **Extend Export test to cover altering sqlColumns and headerRows via ho… ([15312](https://github.com/civicrm/civicrm-core/pull/15312))** + +- **Merge 5.18 to master ([15387](https://github.com/civicrm/civicrm-core/pull/15387))** + +- **[NFC] Rename local variable ([15377](https://github.com/civicrm/civicrm-core/pull/15377))** + +- **Removing 'Array' from user dashboard contributions ([15365](https://github.com/civicrm/civicrm-core/pull/15365))** + +- **Add in an index on geo_code_1 and geo_code_2 to assist with distance … ([15361](https://github.com/civicrm/civicrm-core/pull/15361))** + +- **[REF] Remove call to depreacated getValue call in Mailing Preferences… ([15368](https://github.com/civicrm/civicrm-core/pull/15368))** + +- **5.18 ([15372](https://github.com/civicrm/civicrm-core/pull/15372))** + +- **dev/core#1279 - crmMailingRadioDateSpec.js always has a failure if west of GMT ([15366](https://github.com/civicrm/civicrm-core/pull/15366))** + +- **[REF] Fix path to htmlpurifier in IDS file ([15360](https://github.com/civicrm/civicrm-core/pull/15360))** + +- **Add getdisplayvalue api with unit test. ([15335](https://github.com/civicrm/civicrm-core/pull/15335))** + +- **5.18 ([15357](https://github.com/civicrm/civicrm-core/pull/15357))** + +- **5.18 ([15351](https://github.com/civicrm/civicrm-core/pull/15351))** + +- **(NFC) api4 - Apply standard headers ([15353](https://github.com/civicrm/civicrm-core/pull/15353))** + +- **dev/core#1272 - PHP 7.3 warning message on import contribution ([15346](https://github.com/civicrm/civicrm-core/pull/15346))** + +- **5.18 ([15348](https://github.com/civicrm/civicrm-core/pull/15348))** + +- **Update spelling of htmlpurifier to be correct spelling ([15342](https://github.com/civicrm/civicrm-core/pull/15342))** + +- **Upgrader: handle missing obsolete extensions ([15343](https://github.com/civicrm/civicrm-core/pull/15343))** + +- **5.18 ([15333](https://github.com/civicrm/civicrm-core/pull/15333))** + +- **Api3TestTrait - Only run api4 tests if api4 is present ([15331](https://github.com/civicrm/civicrm-core/pull/15331))** + +- **Mailing API - Expose option list for `header_id` and `footer_id` ([15325](https://github.com/civicrm/civicrm-core/pull/15325))** + +- **dev/core#1264 - Fix notice error on contribution page ([15320](https://github.com/civicrm/civicrm-core/pull/15320))** + +- **dev/core#1262 - Fix case status order in case type settings page ([15319](https://github.com/civicrm/civicrm-core/pull/15319))** + +- **dev/core/1259 update config checklist contribution section ([15317](https://github.com/civicrm/civicrm-core/pull/15317))** + +- **core#1225 fix Event Info and Contribution Page Settings templates ([15168](https://github.com/civicrm/civicrm-core/pull/15168))** + +- **(DX) api/v3/examples - Rename *.php to *.ex.php ([15310](https://github.com/civicrm/civicrm-core/pull/15310))** + +- **Stop passing exportMode, componentTable and ids by reference in export hook ([15302](https://github.com/civicrm/civicrm-core/pull/15302))** + +- **CRM_Utils_JS - Improve encode handling of strings ([15295](https://github.com/civicrm/civicrm-core/pull/15295))** + +- **[NFC] Reword event docs to clarify priority vs weight ([15308](https://github.com/civicrm/civicrm-core/pull/15308))** + +- **Update CiviCRM contributors.txt ([15303](https://github.com/civicrm/civicrm-core/pull/15303))** + +- **[NFC] Add in code comments about the column default issue with is_ema… ([15301](https://github.com/civicrm/civicrm-core/pull/15301))** + +- **5.18 ([15300](https://github.com/civicrm/civicrm-core/pull/15300))** + +- **5.18 ([15290](https://github.com/civicrm/civicrm-core/pull/15290))** + +- **Add CRM_Utils_JS::encode function ([15285](https://github.com/civicrm/civicrm-core/pull/15285))** + +- **Ensure Dashboard domain ID is set even when passed as a param ([15282](https://github.com/civicrm/civicrm-core/pull/15282))** + +- **Unit test for #15094 fix ([15228](https://github.com/civicrm/civicrm-core/pull/15228))** + +- **REF Make the formatParamsForPaymentProcessor function more generic so it can be used more ([15280](https://github.com/civicrm/civicrm-core/pull/15280))** + +- **dev/core#792 Fix Contributions not recording if selected membership is none when using a membership priceset ([15094](https://github.com/civicrm/civicrm-core/pull/15094))** + +- **financial#67 : Check number doesn't show up if payment method name - Check changed to Cheque ([15263](https://github.com/civicrm/civicrm-core/pull/15263))** + +- **dev/financial#68 Ensure that check number is correctly passed through… ([15272](https://github.com/civicrm/civicrm-core/pull/15272))** + +- **5.18 ([15270](https://github.com/civicrm/civicrm-core/pull/15270))** + +- **(REF) Remove unused functions, setTemplateMenuValues() and getNavigation() ([15274](https://github.com/civicrm/civicrm-core/pull/15274))** + +- **5.18 ([15256](https://github.com/civicrm/civicrm-core/pull/15256))** + +- **(dev/joomla#22) Fix deprecated JRequest for Joomla 4.0 ([15132](https://github.com/civicrm/civicrm-core/pull/15132))** + +- **[NFC] array formatting: ([15250](https://github.com/civicrm/civicrm-core/pull/15250))** + +- **5.18 to master ([15249](https://github.com/civicrm/civicrm-core/pull/15249))** + +- **Declare metadata for component payment fields on export ([15243](https://github.com/civicrm/civicrm-core/pull/15243))** + +- **5.18 to master ([15241](https://github.com/civicrm/civicrm-core/pull/15241))** + +- **Fix php 7.2+ deprecation error ([15178](https://github.com/civicrm/civicrm-core/pull/15178))** + +- **Updated entityRefFilters hook to support alter form create links ([15231](https://github.com/civicrm/civicrm-core/pull/15231))** + +- **5.18 ([15237](https://github.com/civicrm/civicrm-core/pull/15237))** + +- **Prevent error on price set membership update ([15142](https://github.com/civicrm/civicrm-core/pull/15142))** + +- **Add unique name to mailing_job.start_date ([15210](https://github.com/civicrm/civicrm-core/pull/15210))** + +- **Fix directory name spelling for htmlpurifier ([265](https://github.com/civicrm/civicrm-packages/pull/265))** + +## Miscellany + +## Credits + +This release was developed by the following code authors: + +AGH Strategies - Andrew Hunt, Eli Lisseck; Agileware - Justin Freeman; Andrew Thompson; Australian Greens - Seamus Lee; Christian Wach; Circle Interactive - Pradeep Nayak; CiviCRM - Coleman Watts, Tim Otten; CiviDesk - Yashodha Chaku; CompuCorp - Vinu Varshith Sekar; Coop SymbioTIC - Mathieu Lutfy, Samuel Vanhove; Dave D; Fuzion - Jitendra Purohit; Greenpeace CEE - Patrick Figel; JMA Consulting - Monish Deb; John Kingsnorth; Megaphone Technology Consulting - Jon Goldberg; MJCO - Mikey O'Toole; MJW Consulting - Matthew Wire; smaen123; Wikimedia Foundation - Eileen McNaughton + +Most authors also reviewed code for this release; in addition, the following +reviewers contributed their comments: + +AGH Strategies - Alice Frumin; Artful Robot - Rich Lott; Australian Greens - Seamus Lee; Circle Interactive - Dave Jenkins, Pradeep Nayak; civibot[bot]; civicrm-builder; CiviCRM - Coleman Watts, Tim Otten; CiviDesk - Yashodha Chaku; Community IT Academy - William Mortada; Coop SymbioTIC - Mathieu Lutfy, Samuel Vanhove; Dave D; Fuzion - Jitendra Purohit; JMA Consulting - Joe Murray, Monish Deb; Korlon - Stuart Gaston; Megaphone Technology Consulting - Jon Goldberg; MJW Consulting - Matthew Wire; Nicol Wistreich; Tadpole Collective - Kevin Cristiano; Wikimedia Foundation - Eileen McNaughton + +## Feedback + +These release notes are edited by Alice Frumin and Andrew Hunt. If you'd like +to provide feedback on them, please log in to https://chat.civicrm.org/civicrm +and contact `@agh1`. diff --git a/templates/CRM/Event/Form/Registration/Confirm.tpl b/templates/CRM/Event/Form/Registration/Confirm.tpl index 26398922f981..876c1d747dc6 100644 --- a/templates/CRM/Event/Form/Registration/Confirm.tpl +++ b/templates/CRM/Event/Form/Registration/Confirm.tpl @@ -167,7 +167,7 @@ {/if} - {if $contributeMode eq 'direct' and ! $is_pay_later and !$isAmountzero and !$isOnWaitlist and !$isRequireApproval} + {if $credit_card_type} {crmRegion name="event-confirm-billing-block"}
diff --git a/templates/CRM/Event/Form/Registration/ThankYou.tpl b/templates/CRM/Event/Form/Registration/ThankYou.tpl index 72d6aa06b28b..ace4920cb4f2 100644 --- a/templates/CRM/Event/Form/Registration/ThankYou.tpl +++ b/templates/CRM/Event/Form/Registration/ThankYou.tpl @@ -188,7 +188,7 @@
{/if} - {if $contributeMode eq 'direct' and $paidEvent and ! $is_pay_later and !$isAmountzero and !$isOnWaitlist and !$isRequireApproval} + {if $credit_card_type} {crmRegion name="event-thankyou-billing-block"}
diff --git a/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php b/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php index 12a03668ccff..358389669af5 100644 --- a/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php +++ b/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php @@ -100,6 +100,7 @@ public function testSubmit() { */ public function testPaidSubmit($thousandSeparator) { $this->setCurrencySeparators($thousandSeparator); + $mut = new CiviMailUtils($this); $paymentProcessorID = $this->processorCreate(); /* @var \CRM_Core_Payment_Dummy $processor */ $processor = Civi\Payment\System::singleton()->getById($paymentProcessorID); @@ -136,15 +137,12 @@ public function testPaidSubmit($thousandSeparator) { 'billing_state_province_id-5' => '1061', 'billing_postal_code-5' => '7', 'billing_country_id-5' => '1228', - 'scriptFee' => '', - 'scriptArray' => '', 'priceSetId' => '6', 'price_7' => [ 13 => 1, ], 'payment_processor_id' => $paymentProcessorID, 'bypass_payment' => '', - 'MAX_FILE_SIZE' => '33554432', 'is_primary' => 1, 'is_pay_later' => 0, 'campaign_id' => NULL, @@ -209,17 +207,27 @@ public function testPaidSubmit($thousandSeparator) { 'financial_trxn_id' => $financialTrxn['id'] + 1, 'amount' => '1.67', ], $entityFinancialTrxns[2], ['id', 'entity_id']); + $mut->checkMailLog([ + 'Event Information and Location', 'Registration Confirmation - Annual CiviCRM meet', + 'Expires: January 2019', + 'Visa', + '************1111', + 'This letter is a confirmation that your registration has been received and your status has been updated to Registered', + ]); + $mut->clearMessages(); } /** * Test for Tax amount for multiple participant. * * @throws \CRM_Core_Exception + * @throws \Exception */ public function testTaxMultipleParticipant() { $mut = new CiviMailUtils($this); $params = ['is_monetary' => 1, 'financial_type_id' => 1]; $event = $this->eventCreate($params); + $this->swapMessageTemplateForTestTemplate('event_online_receipt', 'text'); CRM_Event_Form_Registration_Confirm::testSubmit([ 'id' => $event['id'], 'contributeMode' => 'direct', @@ -236,7 +244,6 @@ public function testTaxMultipleParticipant() { 'additional_participants' => 2, 'payment_processor_id' => 0, 'bypass_payment' => '', - 'MAX_FILE_SIZE' => '33554432', 'is_primary' => 1, 'is_pay_later' => 1, 'campaign_id' => NULL, @@ -297,13 +304,27 @@ public function testTaxMultipleParticipant() { $this->assertEquals($contribution['total_amount'], 440, 'Invalid Tax amount.'); $mailSent = $mut->getAllMessages(); $this->assertCount(3, $mailSent, 'Three mails should have been sent to the 3 participants.'); + $this->assertContains('contactID:::' . $contribution['contact_id'], $mailSent[0]); + $this->assertContains('contactID:::' . ($contribution['contact_id'] + 1), $mailSent[1]); + + $this->callAPISuccess('Payment', 'create', ['total_amount' => 100, 'payment_type_id' => 'Cash', 'contribution_id' => $contribution['id']]); + $mailSent = $mut->getAllMessages(); + $this->assertCount(6, $mailSent); + + $this->assertContains('participant_status:::Registered', $mailSent[3]); + $this->assertContains('Dear Participant2', $mailSent[3]); + + $this->assertContains('contactID:::' . ($contribution['contact_id'] + 1), $mailSent[3]); + $this->assertContains('contactID:::' . ($contribution['contact_id'] + 2), $mailSent[4]); + $this->assertContains('contactID:::' . $contribution['contact_id'], $mailSent[5]); + $this->revertTemplateToReservedTemplate('event_online_receipt', 'text'); } /** * Test online registration for event with no price options selected as per CRM-19964. */ public function testOnlineRegNoPrice() { - $paymentProcessorID = $this->processorCreate(['is_default' => TRUE, 'user_name' => 'Test', 'is_test' => FALSE]); + $this->processorCreate(['is_default' => TRUE, 'user_name' => 'Test', 'is_test' => FALSE]); $paymentProcessorID = $this->processorCreate(['is_default' => TRUE, 'user_name' => 'Test', 'is_test' => TRUE]); $params = [ 'start_date' => date('YmdHis', strtotime('+ 1 week')), diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 6efa3a4e86ae..95a616edd8f2 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -2731,17 +2731,18 @@ protected function createPriceSet($component = 'contribution_page', $componentId * Replace the template with a test-oriented template designed to show all the variables. * * @param string $templateName + * @param string $type */ - protected function swapMessageTemplateForTestTemplate($templateName = 'contribution_online_receipt') { - $testTemplate = file_get_contents(__DIR__ . '/../../templates/message_templates/' . $templateName . '_html.tpl'); + protected function swapMessageTemplateForTestTemplate($templateName = 'contribution_online_receipt', $type = 'html') { + $testTemplate = file_get_contents(__DIR__ . '/../../templates/message_templates/' . $templateName . '_' . $type . '.tpl'); CRM_Core_DAO::executeQuery( "UPDATE civicrm_option_group og LEFT JOIN civicrm_option_value ov ON ov.option_group_id = og.id LEFT JOIN civicrm_msg_template m ON m.workflow_id = ov.id - SET m.msg_html = '{$testTemplate}' - WHERE og.name = 'msg_tpl_workflow_contribution' + SET m.msg_{$type} = %1 + WHERE og.name LIKE 'msg_tpl_workflow_%' AND ov.name = '{$templateName}' - AND m.is_default = 1" + AND m.is_default = 1", [1 => [$testTemplate, 'String']] ); } @@ -2749,14 +2750,15 @@ protected function swapMessageTemplateForTestTemplate($templateName = 'contribut * Reinstate the default template. * * @param string $templateName + * @param string $type */ - protected function revertTemplateToReservedTemplate($templateName = 'contribution_online_receipt') { + protected function revertTemplateToReservedTemplate($templateName = 'contribution_online_receipt', $type = 'html') { CRM_Core_DAO::executeQuery( "UPDATE civicrm_option_group og LEFT JOIN civicrm_option_value ov ON ov.option_group_id = og.id LEFT JOIN civicrm_msg_template m ON m.workflow_id = ov.id LEFT JOIN civicrm_msg_template m2 ON m2.workflow_id = ov.id AND m2.is_reserved = 1 - SET m.msg_html = m2.msg_html + SET m.msg_{$type} = m2.msg_{$type} WHERE og.name = 'msg_tpl_workflow_contribution' AND ov.name = '{$templateName}' AND m.is_default = 1" diff --git a/tests/templates/message_templates/event_online_receipt_text.tpl b/tests/templates/message_templates/event_online_receipt_text.tpl new file mode 100644 index 000000000000..5b9646a6b9dd --- /dev/null +++ b/tests/templates/message_templates/event_online_receipt_text.tpl @@ -0,0 +1,73 @@ +{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if} + +contactID:::{$contactID} +event.confirm_email_text:::{$event.confirm_email_text} +isOnWaitlist:::{$isOnWaitlist} +isRequireApproval:::{$isRequireApproval} +participant_status:::{$participant_status} +pricesetFieldsCount:::{$pricesetFieldsCount} +isPrimary:::{$isPrimary} +conference_sessions:::{$conference_sessions} +is_pay_later:::{$is_pay_later} +isAmountzero:::{$isAmountzero} +isAdditionalParticipant:::{$isAdditionalParticipant} +pay_later_receipt:::{$pay_later_receipt} +event.event_title:::{$event.event_title} +event.event_start_date:::{$event.event_start_date|date_format:"%A"} +event.event_end_date:::{$event.event_end_date|date_format:"%Y%m%d"} +event.is_monetary:::{$event.is_monetary} +event.fee_label:::{$event.fee_label} +conference_sessions:::{$conference_sessions} +event.participant_role::{$event.participant_role} +defaultRole:::{$defaultRole} +isShowLocation:::{$isShowLocation} +location.address.1.display:::{$location.address.1.display} +location.phone.1.phone:::{$location.phone.1.phone} +location.phone.1.phone_type_display:::{$location.phone.1.phone_type_display} +location.phone.1.phone_ext:::{$location.phone.1.phone_ext} +location.email.1.email:::{$location.email.1.email} +event.is_public:::{$event.is_public} +payer.name:::{$payer.name} +lineitem:::{if $lineItem} + {foreach from=$lineItem item=value key=priceset} + {foreach from=$value item=line} + line.html_type:::{$line.html_type} + line.label:::{$line.label} + line.field_title:::{$line.field_title} + line.description:::{$line.description} + line.qty:::{$line.qty} + line.unit_price:::{$line.unit_price} + line.tax_rate:::{$line.tax_rate} + line.tax_amount:::{$line.tax_amount} + line.line_total:::{$line.line_total} + {/foreach} + {/foreach} +{/if} + +part:::{foreach from=$part item=value key=key} +{$key}{$value} +{/foreach} + +dataArray:::{$dataArray} + +totalTaxAmount:::{$totalTaxAmount} +amounts:::{$amounts} +register_date:::{$register_date|crmDate} +receive_date:::{$receive_date|crmDate} +financialTypeName:::{$financialTypeName} +trxn_id:::{$trxn_id} +paidBy:::{$paidBy} +checkNumber:::{$checkNumber} +billingName:::{$billingName} +credit_card_type:::{$credit_card_type} +credit_card_number:::{$credit_card_number} +address:::{$address} +credit_card_exp_date:::{$credit_card_exp_date} +{foreach from=$customPre item=customValue key=customName} + customPre: customName:::$customName + customPre: customValue:::$customValue +{/foreach} +{foreach from=$customPost item=customValue key=customName} + customPost: customName:::$customName + customPost: customValue:::$customValue +{/foreach} diff --git a/xml/templates/message_templates/contribution_offline_receipt_html.tpl b/xml/templates/message_templates/contribution_offline_receipt_html.tpl index c2637887aed9..312ba71d1ba4 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 16bf010402fc..a45c6df75a91 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}

@@ -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 37e7ed750216..c71682e9074e 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 674333e079fb..d04dd909a3be 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 f10d37432f5c..0b23d8eac013 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 0ef701f9c28b..c1a9ae77ca12 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 b1e038b5da3d..af99606cd180 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 e2b09248355a..201a5596f398 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 b0db9b5a31d2..19251cdba918 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_online_receipt_html.tpl b/xml/templates/message_templates/event_online_receipt_html.tpl index 2854deec90fd..f3431df855ed 100644 --- a/xml/templates/message_templates/event_online_receipt_html.tpl +++ b/xml/templates/message_templates/event_online_receipt_html.tpl @@ -33,7 +33,7 @@ {else}

{ts}Thank you for your participation.{/ts} {if $participant_status}{ts 1=$participant_status}This letter is a confirmation that your registration has been received and your status has been updated to %1.{/ts} - {else}{if $isOnWaitlist}{ts}This letter is a confirmation that your registration has been received and your status has been updated to waitlisted.{/ts}{else}{ts}This letter is a confirmation that your registration has been received and your status has been updated to registered.{/ts}{/if}{/if}.

+ {else}{if $isOnWaitlist}{ts}This letter is a confirmation that your registration has been received and your status has been updated to waitlisted.{/ts}{else}{ts}This letter is a confirmation that your registration has been received and your status has been updated to registered.{/ts}{/if}{/if}

{/if} @@ -410,7 +410,7 @@ {/if} - {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval} + {if $credit_card_type} {ts}Credit Card Information{/ts} diff --git a/xml/templates/message_templates/event_online_receipt_text.tpl b/xml/templates/message_templates/event_online_receipt_text.tpl index 390383749191..93d7341a688e 100644 --- a/xml/templates/message_templates/event_online_receipt_text.tpl +++ b/xml/templates/message_templates/event_online_receipt_text.tpl @@ -6,8 +6,7 @@ {ts}Thank you for your participation.{/ts} {if $participant_status}{ts 1=$participant_status}This letter is a confirmation that your registration has been received and your status has been updated to %1.{/ts} {else}{if $isOnWaitlist}{ts}This letter is a confirmation that your registration has been received and your status has been updated to waitlisted.{/ts}{else}{ts}This letter is a confirmation that your registration has been received and your status has been updated to registered.{/ts}{/if} - {/if}. - + {/if} {/if} {if $isOnWaitlist} @@ -212,7 +211,7 @@ You were registered by: {$payer.name} {$address} {/if} -{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval} +{if $credit_card_type} ==========================================================={if $pricesetFieldsCount }===================={/if} {ts}Credit Card Information{/ts} diff --git a/xml/templates/message_templates/event_registration_receipt_html.tpl b/xml/templates/message_templates/event_registration_receipt_html.tpl index e2026ab56da0..810f995dd4a1 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 f57ff600f407..8a58ea90c0fb 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 a8ec69f11623..9ff740f8b7d0 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 8df337a3a21b..dcd942971c9e 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 77e11ff632f1..a06f666d5daa 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 51cec8cff6a7..15387b63decd 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 b260a4a4fe79..97d5089e13ba 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 b4430b33d194..684983682f1e 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 ca6816d166f3..e2e5e18a86f8 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 e8f90132b5c1..dbadd748349a 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 a11ff72685cf..290a37cf2466 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 aeac8a7ba159..449594828ee4 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 6095b4d23fec..ec62bbd3246e 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 2f166dd3d44b..348d8cbfeadf 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 9e4b6d29d66c..6ceb77c35a33 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 4c7f7841afc6..964eabff6221 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 d0e429b5cba5..a3e2c389e57d 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 6f00d5cc0dad..872ce3f2776f 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 2d30dc11c79d..657000a8e609 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 8549b39b4c41..1bf5583ac1aa 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 6dfbaab34d57..386527c9b668 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 8e8a555dfbf3..f95137e86996 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 c2e42a57748e..f59fd86f4ba1 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 2761c3d36ac8..6ff194224f21 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}
-

{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 3e64d34aa8eb..4ae65ed9dce3 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 4a882c1259b3..062f610cb7d2 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 be649c11daee..56acebfb5f14 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 26cbf37e1524..9a21f1b010de 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}