From: Richard van Oosterhout Date: Tue, 15 Oct 2019 06:15:07 +0000 (+0200) Subject: Include Displayname in some workflow templates X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=694cfde6cbe06b0443b24cb51c87d418ad7be647;p=civicrm-core.git Include Displayname in some workflow templates --- diff --git a/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php b/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php index 4b8a52454a..5ce2ed4178 100644 --- a/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php +++ b/tests/phpunit/CRM/Contribute/Form/AdditionalPaymentTest.php @@ -136,7 +136,7 @@ class CRM_Contribute_Form_AdditionalPaymentTest extends CiviUnitTestCase { // pay additional amount by using Credit Card $this->submitPayment(70, 'live', TRUE); $this->checkResults([30, 70], 2); - $mut->assertSubjects(['Payment Receipt -']); + $mut->assertSubjects(['Payment Receipt - Mr. Anthony Anderson II']); $mut->checkMailLog([ 'From: site@something.com', 'Dear Anthony,', @@ -220,7 +220,7 @@ class CRM_Contribute_Form_AdditionalPaymentTest extends CiviUnitTestCase { // pay additional amount by using credit card $this->submitPayment(20, 'live'); $this->checkResults([30, 50, 20], 3); - $mut->assertSubjects(['Payment Receipt -']); + $mut->assertSubjects(['Payment Receipt - Mr. Anthony Anderson II']); $mut->checkMailLog([ 'Dear Anthony,', 'A payment has been received', diff --git a/tests/phpunit/api/v3/PaymentTest.php b/tests/phpunit/api/v3/PaymentTest.php index 953805b0a4..4faa39bc40 100644 --- a/tests/phpunit/api/v3/PaymentTest.php +++ b/tests/phpunit/api/v3/PaymentTest.php @@ -179,7 +179,7 @@ class api_v3_PaymentTest extends CiviUnitTestCase { ]); $this->callAPISuccess('Payment', 'sendconfirmation', ['id' => $payment['id']]); - $mut->assertSubjects(['Payment Receipt - Annual CiviCRM meet']); + $mut->assertSubjects(['Payment Receipt - Annual CiviCRM meet - Mr. Anthony Anderson II']); $mut->checkMailLog([ 'From: "FIXME" ', 'Dear Anthony,', @@ -217,7 +217,7 @@ class api_v3_PaymentTest extends CiviUnitTestCase { // Here we set the email to an invalid email & use check_permissions, domain email should be used. $email = $this->callAPISuccess('Email', 'create', ['contact_id' => 1, 'email' => 'bob@example.com']); $this->callAPISuccess('Payment', 'sendconfirmation', ['id' => $payment['id'], 'from' => $email['id'], 'check_permissions' => 1]); - $mut->assertSubjects(['Payment Receipt - Annual CiviCRM meet', 'Registration Confirmation - Annual CiviCRM meet']); + $mut->assertSubjects(['Payment Receipt - Annual CiviCRM meet - Mr. Anthony Anderson II', 'Registration Confirmation - Annual CiviCRM meet - Mr. Anthony Anderson II']); $mut->checkMailLog([ 'From: "FIXME" ', 'Dear Anthony,', @@ -269,7 +269,7 @@ class api_v3_PaymentTest extends CiviUnitTestCase { } $this->callAPISuccess('Payment', 'sendconfirmation', ['id' => $payment['id']]); - $mut->assertSubjects(['Refund Notification - Annual CiviCRM meet']); + $mut->assertSubjects(['Refund Notification - Annual CiviCRM meet - Mr. Anthony Anderson II']); $mut->checkMailLog([ 'Dear Anthony,', 'A refund has been issued based on changes in your registration selections.', diff --git a/xml/templates/message_templates/contribution_dupalert_subject.tpl b/xml/templates/message_templates/contribution_dupalert_subject.tpl index 3e255fa5fb..bb59208f22 100644 --- a/xml/templates/message_templates/contribution_dupalert_subject.tpl +++ b/xml/templates/message_templates/contribution_dupalert_subject.tpl @@ -1 +1 @@ -{ts}CiviContribute Alert: Possible Duplicate Contact Record{/ts} +{ts}CiviContribute Alert: Possible Duplicate Contact Record{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/contribution_invoice_receipt_subject.tpl b/xml/templates/message_templates/contribution_invoice_receipt_subject.tpl index f99fe44750..aedf9255bc 100644 --- a/xml/templates/message_templates/contribution_invoice_receipt_subject.tpl +++ b/xml/templates/message_templates/contribution_invoice_receipt_subject.tpl @@ -9,3 +9,4 @@ {else} {ts}Invoice{/ts} {/if} + - {contact.display_name} diff --git a/xml/templates/message_templates/contribution_offline_receipt_subject.tpl b/xml/templates/message_templates/contribution_offline_receipt_subject.tpl index a2e2f61c76..2a19c6e6c3 100644 --- a/xml/templates/message_templates/contribution_offline_receipt_subject.tpl +++ b/xml/templates/message_templates/contribution_offline_receipt_subject.tpl @@ -1 +1 @@ -{ts}Contribution Receipt{/ts} +{ts}Contribution Receipt{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/contribution_online_receipt_subject.tpl b/xml/templates/message_templates/contribution_online_receipt_subject.tpl index 32d4e402a8..052dce5bd7 100644 --- a/xml/templates/message_templates/contribution_online_receipt_subject.tpl +++ b/xml/templates/message_templates/contribution_online_receipt_subject.tpl @@ -1 +1 @@ -{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title} +{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title} - {contact.display_name} diff --git a/xml/templates/message_templates/contribution_recurring_billing_subject.tpl b/xml/templates/message_templates/contribution_recurring_billing_subject.tpl index 69d9c90129..0a2a03b064 100644 --- a/xml/templates/message_templates/contribution_recurring_billing_subject.tpl +++ b/xml/templates/message_templates/contribution_recurring_billing_subject.tpl @@ -1 +1 @@ -{ts}Recurring Contribution Billing Updates{/ts} \ No newline at end of file +{ts}Recurring Contribution Billing Updates{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/contribution_recurring_cancelled_subject.tpl b/xml/templates/message_templates/contribution_recurring_cancelled_subject.tpl index d389480e14..2b5a4d805f 100644 --- a/xml/templates/message_templates/contribution_recurring_cancelled_subject.tpl +++ b/xml/templates/message_templates/contribution_recurring_cancelled_subject.tpl @@ -1 +1 @@ -{ts}Recurring Contribution Cancellation Notification{/ts} +{ts}Recurring Contribution Cancellation Notification{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/contribution_recurring_edit_subject.tpl b/xml/templates/message_templates/contribution_recurring_edit_subject.tpl index d4a5da1aea..3046495216 100644 --- a/xml/templates/message_templates/contribution_recurring_edit_subject.tpl +++ b/xml/templates/message_templates/contribution_recurring_edit_subject.tpl @@ -1 +1 @@ -{ts}Recurring Contribution Update Notification{/ts} \ No newline at end of file +{ts}Recurring Contribution Update Notification{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/contribution_recurring_notify_subject.tpl b/xml/templates/message_templates/contribution_recurring_notify_subject.tpl index 0dfee3ad39..c9a9d927ad 100644 --- a/xml/templates/message_templates/contribution_recurring_notify_subject.tpl +++ b/xml/templates/message_templates/contribution_recurring_notify_subject.tpl @@ -1 +1 @@ -{ts}Recurring Contribution Notification{/ts} +{ts}Recurring Contribution Notification{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/event_offline_receipt_subject.tpl b/xml/templates/message_templates/event_offline_receipt_subject.tpl index 5cbe60c144..e686b72f8c 100644 --- a/xml/templates/message_templates/event_offline_receipt_subject.tpl +++ b/xml/templates/message_templates/event_offline_receipt_subject.tpl @@ -1 +1 @@ -{ts}Event Confirmation{/ts} - {$event.title} +{ts}Event Confirmation{/ts} - {$event.title} - {contact.display_name} diff --git a/xml/templates/message_templates/event_online_receipt_subject.tpl b/xml/templates/message_templates/event_online_receipt_subject.tpl index 709fb37aad..7bb2730637 100644 --- a/xml/templates/message_templates/event_online_receipt_subject.tpl +++ b/xml/templates/message_templates/event_online_receipt_subject.tpl @@ -1 +1 @@ -{if $isOnWaitlist}{ts}Wait List Confirmation{/ts}{elseif $isRequireApproval}{ts}Registration Request Confirmation{/ts}{else}{ts}Registration Confirmation{/ts}{/if} - {$event.event_title} +{if $isOnWaitlist}{ts}Wait List Confirmation{/ts}{elseif $isRequireApproval}{ts}Registration Request Confirmation{/ts}{else}{ts}Registration Confirmation{/ts}{/if} - {$event.event_title} - {contact.display_name} diff --git a/xml/templates/message_templates/event_registration_receipt_subject.tpl b/xml/templates/message_templates/event_registration_receipt_subject.tpl index faed123a7f..d6cb8cba8c 100644 --- a/xml/templates/message_templates/event_registration_receipt_subject.tpl +++ b/xml/templates/message_templates/event_registration_receipt_subject.tpl @@ -1 +1 @@ -Receipt for {if $events_in_cart} Event Registration{/if} +Receipt for {if $events_in_cart} Event Registration{/if} - {contact.display_name} diff --git a/xml/templates/message_templates/membership_autorenew_billing_subject.tpl b/xml/templates/message_templates/membership_autorenew_billing_subject.tpl index c03dab7845..3579f90330 100644 --- a/xml/templates/message_templates/membership_autorenew_billing_subject.tpl +++ b/xml/templates/message_templates/membership_autorenew_billing_subject.tpl @@ -1 +1 @@ -{ts}Membership Autorenewal Billing Updates{/ts} \ No newline at end of file +{ts}Membership Autorenewal Billing Updates{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/membership_autorenew_cancelled_subject.tpl b/xml/templates/message_templates/membership_autorenew_cancelled_subject.tpl index ccfb0de98f..69c2ab8a3c 100644 --- a/xml/templates/message_templates/membership_autorenew_cancelled_subject.tpl +++ b/xml/templates/message_templates/membership_autorenew_cancelled_subject.tpl @@ -1 +1 @@ -{ts}Autorenew Membership Cancellation Notification{/ts} +{ts}Autorenew Membership Cancellation Notification{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/membership_offline_receipt_subject.tpl b/xml/templates/message_templates/membership_offline_receipt_subject.tpl index ccc8b3cfa6..abc79f7c55 100644 --- a/xml/templates/message_templates/membership_offline_receipt_subject.tpl +++ b/xml/templates/message_templates/membership_offline_receipt_subject.tpl @@ -2,4 +2,4 @@ {ts}Membership Confirmation and Receipt{/ts} {elseif $receiptType EQ 'membership renewal'} {ts}Membership Renewal Confirmation and Receipt{/ts} -{/if} +{/if} - {contact.display_name} diff --git a/xml/templates/message_templates/membership_online_receipt_subject.tpl b/xml/templates/message_templates/membership_online_receipt_subject.tpl index 32d4e402a8..052dce5bd7 100644 --- a/xml/templates/message_templates/membership_online_receipt_subject.tpl +++ b/xml/templates/message_templates/membership_online_receipt_subject.tpl @@ -1 +1 @@ -{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title} +{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title} - {contact.display_name} diff --git a/xml/templates/message_templates/participant_cancelled_subject.tpl b/xml/templates/message_templates/participant_cancelled_subject.tpl index e45a6be64c..e397409839 100644 --- a/xml/templates/message_templates/participant_cancelled_subject.tpl +++ b/xml/templates/message_templates/participant_cancelled_subject.tpl @@ -1 +1 @@ -{ts 1=$event.event_title}Event Registration Cancelled for %1{/ts} +{ts 1=$event.event_title}Event Registration Cancelled for %1{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/participant_confirm_subject.tpl b/xml/templates/message_templates/participant_confirm_subject.tpl index 2f3b947972..5bac86835b 100644 --- a/xml/templates/message_templates/participant_confirm_subject.tpl +++ b/xml/templates/message_templates/participant_confirm_subject.tpl @@ -1 +1 @@ -{ts 1=$event.event_title}Confirm your registration for %1{/ts} +{ts 1=$event.event_title}Confirm your registration for %1{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/participant_expired_subject.tpl b/xml/templates/message_templates/participant_expired_subject.tpl index aeb56d3204..a62fd9e566 100644 --- a/xml/templates/message_templates/participant_expired_subject.tpl +++ b/xml/templates/message_templates/participant_expired_subject.tpl @@ -1 +1 @@ -{ts 1=$event.event_title}Event registration has expired for %1{/ts} +{ts 1=$event.event_title}Event registration has expired for %1{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/participant_transferred_subject.tpl b/xml/templates/message_templates/participant_transferred_subject.tpl index 6488ece90b..2e2bf244d5 100644 --- a/xml/templates/message_templates/participant_transferred_subject.tpl +++ b/xml/templates/message_templates/participant_transferred_subject.tpl @@ -1 +1 @@ -{ts 1=$event.event_title}Event Registration Transferred for %1{/ts} +{ts 1=$event.event_title}Event Registration Transferred for %1{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/payment_or_refund_notification_subject.tpl b/xml/templates/message_templates/payment_or_refund_notification_subject.tpl index ef17a4ce55..7fc6a6b084 100644 --- a/xml/templates/message_templates/payment_or_refund_notification_subject.tpl +++ b/xml/templates/message_templates/payment_or_refund_notification_subject.tpl @@ -1 +1 @@ -{if $isRefund}{ts}Refund Notification{/ts}{else}{ts}Payment Receipt{/ts}{/if} - {if $component eq 'event'}{$event.title}{/if} \ No newline at end of file +{if $isRefund}{ts}Refund Notification{/ts}{else}{ts}Payment Receipt{/ts}{/if}{if $component eq 'event'} - {$event.title}{/if} - {contact.display_name} diff --git a/xml/templates/message_templates/pcp_notify_subject.tpl b/xml/templates/message_templates/pcp_notify_subject.tpl index d75d4601d0..a42b381f8a 100644 --- a/xml/templates/message_templates/pcp_notify_subject.tpl +++ b/xml/templates/message_templates/pcp_notify_subject.tpl @@ -1 +1 @@ -{ts}Personal Campaign Page Notification{/ts} +{ts}Personal Campaign Page Notification{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/pcp_owner_notify_subject.tpl b/xml/templates/message_templates/pcp_owner_notify_subject.tpl index 83d9e8f933..95e8d9789d 100644 --- a/xml/templates/message_templates/pcp_owner_notify_subject.tpl +++ b/xml/templates/message_templates/pcp_owner_notify_subject.tpl @@ -1 +1 @@ -{ts}Someone has just donated to your personal campaign page{/ts} +{ts}Someone has just donated to your personal campaign page{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/pcp_status_change_subject.tpl b/xml/templates/message_templates/pcp_status_change_subject.tpl index dc5bc5ee1f..be7baecc72 100644 --- a/xml/templates/message_templates/pcp_status_change_subject.tpl +++ b/xml/templates/message_templates/pcp_status_change_subject.tpl @@ -1 +1 @@ -{ts 1=$contribPageTitle}Your Personal Campaign Page for %1{/ts} +{ts 1=$contribPageTitle}Your Personal Campaign Page for %1{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/pcp_supporter_notify_subject.tpl b/xml/templates/message_templates/pcp_supporter_notify_subject.tpl index dc5bc5ee1f..be7baecc72 100644 --- a/xml/templates/message_templates/pcp_supporter_notify_subject.tpl +++ b/xml/templates/message_templates/pcp_supporter_notify_subject.tpl @@ -1 +1 @@ -{ts 1=$contribPageTitle}Your Personal Campaign Page for %1{/ts} +{ts 1=$contribPageTitle}Your Personal Campaign Page for %1{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/petition_confirmation_needed_subject.tpl b/xml/templates/message_templates/petition_confirmation_needed_subject.tpl index 8f86ab9231..2d39e4c4dc 100644 --- a/xml/templates/message_templates/petition_confirmation_needed_subject.tpl +++ b/xml/templates/message_templates/petition_confirmation_needed_subject.tpl @@ -1 +1 @@ -Confirmation of signature needed for {$petition.title} +Confirmation of signature needed for {$petition.title} - {contact.display_name} diff --git a/xml/templates/message_templates/petition_sign_subject.tpl b/xml/templates/message_templates/petition_sign_subject.tpl index 49edf1e89b..cbf65b26a3 100644 --- a/xml/templates/message_templates/petition_sign_subject.tpl +++ b/xml/templates/message_templates/petition_sign_subject.tpl @@ -1 +1 @@ -Thank you for signing {$petition.title} \ No newline at end of file +Thank you for signing {$petition.title} - {contact.display_name} diff --git a/xml/templates/message_templates/pledge_acknowledge_subject.tpl b/xml/templates/message_templates/pledge_acknowledge_subject.tpl index ce0c992859..c00efef5f2 100644 --- a/xml/templates/message_templates/pledge_acknowledge_subject.tpl +++ b/xml/templates/message_templates/pledge_acknowledge_subject.tpl @@ -1 +1 @@ -{ts}Thank you for this pledge{/ts} +{ts}Thank you for your Pledge{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/pledge_reminder_subject.tpl b/xml/templates/message_templates/pledge_reminder_subject.tpl index 9e06198c34..1d3b010781 100644 --- a/xml/templates/message_templates/pledge_reminder_subject.tpl +++ b/xml/templates/message_templates/pledge_reminder_subject.tpl @@ -1 +1 @@ -{ts}Pledge Payment Reminder{/ts} +{ts}Pledge Payment Reminder{/ts} - {contact.display_name} diff --git a/xml/templates/message_templates/uf_notify_subject.tpl b/xml/templates/message_templates/uf_notify_subject.tpl index 0da62f65d2..0fd90f776a 100644 --- a/xml/templates/message_templates/uf_notify_subject.tpl +++ b/xml/templates/message_templates/uf_notify_subject.tpl @@ -1 +1 @@ -{$grouptitle} {ts 1=$displayName}Submitted by %1{/ts} +{$grouptitle} {ts 1=$displayName}Submitted by %1{/ts} - {contact.display_name}