From e248181910b024248b9d76a7d82890c31ee9e427 Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 9 Oct 2019 15:14:30 +0200 Subject: [PATCH] Remove template refs to 'print for your records' We agreed to remove these a while back. Since https://github.com/civicrm/civicrm-core/pull/15466 is already upgrading them it's a good chance to rip our the rest: --- tests/phpunit/CRM/Contribute/Form/ContributionTest.php | 7 +++++-- tests/phpunit/CRM/Core/Payment/BaseIPNTest.php | 3 --- tests/phpunit/api/v3/ContributionTest.php | 8 +------- .../contribution_offline_receipt_html.tpl | 2 -- .../contribution_offline_receipt_text.tpl | 2 -- .../contribution_online_receipt_html.tpl | 2 -- .../contribution_online_receipt_text.tpl | 3 --- .../message_templates/event_offline_receipt_html.tpl | 2 -- .../message_templates/event_offline_receipt_text.tpl | 3 --- .../message_templates/event_online_receipt_html.tpl | 2 -- .../message_templates/event_online_receipt_text.tpl | 3 --- .../message_templates/event_registration_receipt_html.tpl | 2 +- .../message_templates/event_registration_receipt_text.tpl | 2 +- .../message_templates/membership_offline_receipt_html.tpl | 3 --- .../message_templates/membership_offline_receipt_text.tpl | 4 ---- .../message_templates/membership_online_receipt_html.tpl | 2 -- .../message_templates/membership_online_receipt_text.tpl | 3 --- 17 files changed, 8 insertions(+), 45 deletions(-) diff --git a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php index d9ba98acce..1638cd5237 100644 --- a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php +++ b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php @@ -592,6 +592,9 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase { /** * Test the submit function on the contribution page. + * + * @throws \CRM_Core_Exception + * @throws \CiviCRM_API3_Exception */ public function testSubmitEmailReceipt() { $form = new CRM_Contribute_Form_Contribution(); @@ -606,7 +609,7 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase { ], CRM_Core_Action::ADD); $this->callAPISuccessGetCount('Contribution', ['contact_id' => $this->_individualId], 1); $mut->checkMailLog([ - '

Please print this receipt for your records.

', + 'Contribution Information', ]); $mut->stop(); } @@ -631,7 +634,7 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase { ], CRM_Core_Action::ADD); $this->callAPISuccessGetCount('Contribution', ['contact_id' => $this->_individualId], 1); $mut->checkMailLog([ - '

Please print this receipt for your records.

', + 'Thank you for your support', '', ]); $mut->stop(); diff --git a/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php b/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php index 10eae5e7bf..112bea8f69 100644 --- a/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/BaseIPNTest.php @@ -179,7 +179,6 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase { $msg = $this->IPN->sendMail($this->input, $this->ids, $this->objects, $values, FALSE, TRUE); $this->assertTrue(is_array($msg), "Message returned as an array in line"); $this->assertEquals('Mr. Anthony Anderson II', $msg['to']); - $this->assertContains('

Please print this confirmation for your records.

', $msg['html']); $this->assertContains('Membership Type: General', $msg['body']); } @@ -219,7 +218,6 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase { $msg = $this->IPN->sendMail($this->input, $this->ids, $this->objects, $values, FALSE, TRUE); $this->assertTrue(is_array($msg), "Message returned as an array in line" . __LINE__); $this->assertEquals('Mr. Anthony Anderson II', $msg['to']); - $this->assertContains('

Please print this confirmation for your records.

', $msg['html']); $this->assertContains('Membership Type: General', $msg['body']); } @@ -259,7 +257,6 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase { $msg = $this->IPN->sendMail($this->input, $this->ids, $this->objects, $values, FALSE, TRUE); $this->assertTrue(is_array($msg), "Message returned as an array in line" . __LINE__); $this->assertEquals('Mr. Anthony Anderson II', $msg['to']); - $this->assertContains('

Please print this confirmation for your records.

', $msg['html']); $this->assertContains('Thank you for your participation', $msg['body']); } diff --git a/tests/phpunit/api/v3/ContributionTest.php b/tests/phpunit/api/v3/ContributionTest.php index a63b33bb9a..0e170b61ce 100644 --- a/tests/phpunit/api/v3/ContributionTest.php +++ b/tests/phpunit/api/v3/ContributionTest.php @@ -2847,7 +2847,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase { 'is_email_receipt' => 1, ]); $mut->checkMailLog([ - 'Please print this receipt for your records.', + 'Contribution Information', ]); $mut->stop(); } @@ -3342,7 +3342,6 @@ class api_v3_ContributionTest extends CiviUnitTestCase { $mut->checkMailLog([ '$ 100.00', 'Contribution Information', - 'Please print this confirmation for your records', ], [ 'Event', ]); @@ -4102,7 +4101,6 @@ class api_v3_ContributionTest extends CiviUnitTestCase { $mut->checkMailLog([ 'From: CiviCRM LLC ', 'Contribution Information', - 'Please print this confirmation for your records', ], [ 'Event', ]); @@ -4123,7 +4121,6 @@ class api_v3_ContributionTest extends CiviUnitTestCase { $mut->checkMailLog([ 'From: ' . $domain['from_name'] . ' <' . $domain['from_email'] . '>', 'Contribution Information', - 'Please print this confirmation for your records', ], [ 'Event', ]); @@ -4146,7 +4143,6 @@ class api_v3_ContributionTest extends CiviUnitTestCase { $mut->checkMailLog([ 'From: ' . $domain['from_name'] . ' <' . $domain['from_email'] . '>', 'Contribution Information', - 'Please print this confirmation for your records', ], [ 'Event', ] @@ -4188,7 +4184,6 @@ class api_v3_ContributionTest extends CiviUnitTestCase { $mut->checkMailLog([ 'From: CiviCRM LLC ', 'Contribution Information', - 'Please print this confirmation for your records', ], [ 'Event', ]); @@ -4214,7 +4209,6 @@ class api_v3_ContributionTest extends CiviUnitTestCase { $mut->checkMailLog([ 'From: ' . $domain['name'] . ' <' . $domain['domain_email'] . '>', 'Contribution Information', - 'Please print this confirmation for your records', ], [ 'Event', ]); diff --git a/xml/templates/message_templates/contribution_offline_receipt_html.tpl b/xml/templates/message_templates/contribution_offline_receipt_html.tpl index 8a840cef62..c2637887ae 100644 --- a/xml/templates/message_templates/contribution_offline_receipt_html.tpl +++ b/xml/templates/message_templates/contribution_offline_receipt_html.tpl @@ -28,8 +28,6 @@

{ts}Thank you for your support.{/ts}

{/if} -

{ts}Please print this receipt for your records.{/ts}

- diff --git a/xml/templates/message_templates/contribution_offline_receipt_text.tpl b/xml/templates/message_templates/contribution_offline_receipt_text.tpl index 6b46e34259..16bf010402 100644 --- a/xml/templates/message_templates/contribution_offline_receipt_text.tpl +++ b/xml/templates/message_templates/contribution_offline_receipt_text.tpl @@ -2,8 +2,6 @@ {$formValues.receipt_text} {else}{ts}Thank you for your support.{/ts}{/if} -{ts}Please print this receipt for your records.{/ts} - =========================================================== {ts}Contribution Information{/ts} diff --git a/xml/templates/message_templates/contribution_online_receipt_html.tpl b/xml/templates/message_templates/contribution_online_receipt_html.tpl index 36b1c319b1..1bf1802538 100644 --- a/xml/templates/message_templates/contribution_online_receipt_html.tpl +++ b/xml/templates/message_templates/contribution_online_receipt_html.tpl @@ -28,8 +28,6 @@ {if $is_pay_later}

{$pay_later_receipt}

{* FIXME: this might be text rather than HTML *} - {else} -

{ts}Please print this confirmation for your records.{/ts}

{/if} diff --git a/xml/templates/message_templates/contribution_online_receipt_text.tpl b/xml/templates/message_templates/contribution_online_receipt_text.tpl index f485c953ca..8e74171ac6 100644 --- a/xml/templates/message_templates/contribution_online_receipt_text.tpl +++ b/xml/templates/message_templates/contribution_online_receipt_text.tpl @@ -7,9 +7,6 @@ =========================================================== {$pay_later_receipt} =========================================================== -{else} - -{ts}Please print this receipt for your records.{/ts} {/if} {if $amount} diff --git a/xml/templates/message_templates/event_offline_receipt_html.tpl b/xml/templates/message_templates/event_offline_receipt_html.tpl index 58ff6f1fd1..21b4617ffd 100644 --- a/xml/templates/message_templates/event_offline_receipt_html.tpl +++ b/xml/templates/message_templates/event_offline_receipt_html.tpl @@ -39,8 +39,6 @@ {/if} {elseif $is_pay_later}

{$pay_later_receipt}

{* FIXME: this might be text rather than HTML *} - {else} -

{ts}Please print this confirmation for your records.{/ts}

{/if} diff --git a/xml/templates/message_templates/event_offline_receipt_text.tpl b/xml/templates/message_templates/event_offline_receipt_text.tpl index ceb48e0c20..1a8a8a56ca 100644 --- a/xml/templates/message_templates/event_offline_receipt_text.tpl +++ b/xml/templates/message_templates/event_offline_receipt_text.tpl @@ -32,9 +32,6 @@ {$pay_later_receipt} ==========================================================={if $pricesetFieldsCount }===================={/if} -{else} - -{ts}Please print this confirmation for your records.{/ts} {/if} diff --git a/xml/templates/message_templates/event_online_receipt_html.tpl b/xml/templates/message_templates/event_online_receipt_html.tpl index f6fe878351..2854deec90 100644 --- a/xml/templates/message_templates/event_online_receipt_html.tpl +++ b/xml/templates/message_templates/event_online_receipt_html.tpl @@ -50,8 +50,6 @@ {/if} {elseif $is_pay_later && !$isAmountzero && !$isAdditionalParticipant}

{$pay_later_receipt}

{* FIXME: this might be text rather than HTML *} - {else} -

{ts}Please print this confirmation for your records.{/ts}

{/if} diff --git a/xml/templates/message_templates/event_online_receipt_text.tpl b/xml/templates/message_templates/event_online_receipt_text.tpl index be1e020d70..3903837491 100644 --- a/xml/templates/message_templates/event_online_receipt_text.tpl +++ b/xml/templates/message_templates/event_online_receipt_text.tpl @@ -38,9 +38,6 @@ {$pay_later_receipt} ==========================================================={if $pricesetFieldsCount }===================={/if} -{else} - -{ts}Please print this confirmation for your records.{/ts} {/if} diff --git a/xml/templates/message_templates/event_registration_receipt_html.tpl b/xml/templates/message_templates/event_registration_receipt_html.tpl index 3436a19034..e2026ab56d 100644 --- a/xml/templates/message_templates/event_registration_receipt_html.tpl +++ b/xml/templates/message_templates/event_registration_receipt_html.tpl @@ -24,7 +24,7 @@

{$pay_later_receipt}

{/if} -

Your order number is #{$transaction_id}. Please print this confirmation for your records.{if $line_items && !$is_refund} Information about the workshops will be sent separately to each participant.{/if} +

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"}:

diff --git a/xml/templates/message_templates/event_registration_receipt_text.tpl b/xml/templates/message_templates/event_registration_receipt_text.tpl index 695b53d604..f57ff600f4 100644 --- a/xml/templates/message_templates/event_registration_receipt_text.tpl +++ b/xml/templates/message_templates/event_registration_receipt_text.tpl @@ -9,7 +9,7 @@ Dear {contact.display_name}, {$pay_later_receipt} {/if} - Your order number is #{$transaction_id}. Please print this confirmation for your records.{if $line_items && !$is_refund} Information about the workshops will be sent separately to each participant.{/if} + 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/membership_offline_receipt_html.tpl b/xml/templates/message_templates/membership_offline_receipt_html.tpl index 8d5347a721..b260a4a4fe 100644 --- a/xml/templates/message_templates/membership_offline_receipt_html.tpl +++ b/xml/templates/message_templates/membership_offline_receipt_html.tpl @@ -28,9 +28,6 @@ {else}

{ts}Thank you for your support.{/ts}

{/if} - {if ! $cancelled} -

{ts}Please print this receipt for your records.{/ts}

- {/if} diff --git a/xml/templates/message_templates/membership_offline_receipt_text.tpl b/xml/templates/message_templates/membership_offline_receipt_text.tpl index 7df285af46..3e64d34aa8 100644 --- a/xml/templates/message_templates/membership_offline_receipt_text.tpl +++ b/xml/templates/message_templates/membership_offline_receipt_text.tpl @@ -4,10 +4,6 @@ {$formValues.receipt_text_renewal} {else}{ts}Thank you for your support.{/ts}{/if} -{if ! $cancelled}{ts}Please print this receipt for your records.{/ts} - - -{/if} {if !$lineItem} =========================================================== {ts}Membership Information{/ts} diff --git a/xml/templates/message_templates/membership_online_receipt_html.tpl b/xml/templates/message_templates/membership_online_receipt_html.tpl index 254de657af..2a24b63a7b 100644 --- a/xml/templates/message_templates/membership_online_receipt_html.tpl +++ b/xml/templates/message_templates/membership_online_receipt_html.tpl @@ -28,8 +28,6 @@ {if $is_pay_later}

{$pay_later_receipt}

{* FIXME: this might be text rather than HTML *} - {else} -

{ts}Please print this confirmation for your records.{/ts}

{/if} diff --git a/xml/templates/message_templates/membership_online_receipt_text.tpl b/xml/templates/message_templates/membership_online_receipt_text.tpl index 341a8ac7c9..f4d0177c3d 100644 --- a/xml/templates/message_templates/membership_online_receipt_text.tpl +++ b/xml/templates/message_templates/membership_online_receipt_text.tpl @@ -7,9 +7,6 @@ =========================================================== {$pay_later_receipt} =========================================================== -{else} - -{ts}Please print this receipt for your records.{/ts} {/if} {if $membership_assign && !$useForMember} -- 2.25.1