From 4cae68de23dd6509aaca0ed39fa63cd1eb3899e5 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 13 Dec 2023 14:58:50 +1300 Subject: [PATCH] Remove the text versions of a few more template We have done a few of the most common ones. These are all lest common ones, but could still cause formatting changes in the text version, requiring a dual to the death with jenkins --- .../phpunit/CRM/Campaign/BAO/PetitionTest.php | 5 +-- tests/phpunit/CRM/Pledge/Form/PledgeTest.php | 10 ++--- .../petition_confirmation_needed_text.tpl | 10 ----- .../message_templates/petition_sign_text.tpl | 3 -- .../pledge_acknowledge_text.tpl | 45 ------------------- .../pledge_reminder_text.tpl | 33 -------------- .../message_templates/test_preview_text.tpl | 7 --- .../message_templates/uf_notify_text.tpl | 11 ----- 8 files changed, 5 insertions(+), 119 deletions(-) diff --git a/tests/phpunit/CRM/Campaign/BAO/PetitionTest.php b/tests/phpunit/CRM/Campaign/BAO/PetitionTest.php index 84de13d773..cc8866b636 100644 --- a/tests/phpunit/CRM/Campaign/BAO/PetitionTest.php +++ b/tests/phpunit/CRM/Campaign/BAO/PetitionTest.php @@ -68,9 +68,8 @@ class CRM_Campaign_BAO_PetitionTest extends CiviUnitTestCase { $mut->checkMailLog([ '1600 Pennsylvania Avenue', 'Washington', - 'Dear Anthony, -Thank you for signing Test Petition. -', + 'Dear Anthony,', + 'Thank you for signing Test Petition.', ]); $mut->stop(); } diff --git a/tests/phpunit/CRM/Pledge/Form/PledgeTest.php b/tests/phpunit/CRM/Pledge/Form/PledgeTest.php index d6b9f2daa1..644f978de0 100644 --- a/tests/phpunit/CRM/Pledge/Form/PledgeTest.php +++ b/tests/phpunit/CRM/Pledge/Form/PledgeTest.php @@ -18,11 +18,10 @@ class CRM_Pledge_Form_PledgeTest extends CiviUnitTestCase { $mut = new CiviMailUtils($this); $loggedInUser = $this->createLoggedInUser(); $this->addLocationBlockToDomain(); - $this->swapMessageTemplateForInput('pledge_acknowledge', '{domain.name} {contact.first_name}'); + $this->swapMessageTemplateForInput('pledge_acknowledge', '{domain.name} {contact.first_name} {contact.email_greeting_display}'); $form = $this->getFormObject('CRM_Pledge_Form_Pledge', [ 'amount' => 10, - 'installments' => 1, 'contact_id' => $this->individualCreate(), 'is_acknowledge' => 1, 'start_date' => '2021-01-04', @@ -42,13 +41,10 @@ class CRM_Pledge_Form_PledgeTest extends CiviUnitTestCase { $form->postProcess(); $mut->checkAllMailLog([ 'Default Domain Name Anthony', - // These strings that are in the text template, since we swapped out the html one. - 123, - 'fixme.domainemail@example.org', - 'Dear Anthony,', + 'Dear Anthony', ]); $mut->clearMessages(); - $this->revertTemplateToReservedTemplate('pledge_acknowledge'); + $this->revertTemplateToReservedTemplate(); } } diff --git a/xml/templates/message_templates/petition_confirmation_needed_text.tpl b/xml/templates/message_templates/petition_confirmation_needed_text.tpl index 619c499d0a..e69de29bb2 100644 --- a/xml/templates/message_templates/petition_confirmation_needed_text.tpl +++ b/xml/templates/message_templates/petition_confirmation_needed_text.tpl @@ -1,10 +0,0 @@ -{assign var="greeting" value="{contact.email_greeting_display}"}{if $greeting}{$greeting},{/if} - -Thank you for signing {$petition.title}. - -In order to complete your signature, we must confirm your e-mail. -Please do so by visiting the following email confirmation web page: - -{$petition.confirmUrlPlainText} - -If you did not sign this petition, please ignore this message. diff --git a/xml/templates/message_templates/petition_sign_text.tpl b/xml/templates/message_templates/petition_sign_text.tpl index 90dbd6f8be..e69de29bb2 100644 --- a/xml/templates/message_templates/petition_sign_text.tpl +++ b/xml/templates/message_templates/petition_sign_text.tpl @@ -1,3 +0,0 @@ -{assign var="greeting" value="{contact.email_greeting_display}"}{if $greeting}{$greeting},{/if} - -Thank you for signing {survey.title}. diff --git a/xml/templates/message_templates/pledge_acknowledge_text.tpl b/xml/templates/message_templates/pledge_acknowledge_text.tpl index 7123f954ee..e69de29bb2 100644 --- a/xml/templates/message_templates/pledge_acknowledge_text.tpl +++ b/xml/templates/message_templates/pledge_acknowledge_text.tpl @@ -1,45 +0,0 @@ -{assign var="greeting" value="{contact.email_greeting_display}"}{if $greeting}{$greeting},{/if} - -{ts}Thank you for your generous pledge.{/ts} - -=========================================================== -{ts}Pledge Information{/ts} - -=========================================================== -{ts}Pledge Received{/ts}: {$create_date|truncate:10:''|crmDate} -{ts}Total Pledge Amount{/ts}: {$total_pledge_amount|crmMoney:$currency} - -=========================================================== -{ts}Payment Schedule{/ts} - -=========================================================== -{ts 1=$scheduled_amount|crmMoney:$currency 2=$frequency_interval 3=$frequency_unit 4=$installments}%1 every %2 %3 for %4 installments.{/ts} - -{if $frequency_day} - -{ts 1=$frequency_day 2=$frequency_unit}Payments are due on day %1 of the %2.{/ts} -{/if} - -{if $payments} -{assign var="count" value=1} -{foreach from=$payments item=payment} - -{ts 1=$count}Payment %1{/ts}: {$payment.amount|crmMoney:$currency} {if $payment.status eq 1}{ts}paid{/ts} {$payment.receive_date|truncate:10:''|crmDate}{else}{ts}due{/ts} {$payment.due_date|truncate:10:''|crmDate}{/if} -{assign var="count" value=$count+1} -{/foreach} -{/if} - - -{ts 1='{domain.phone}' 2='{domain.email}'}Please contact us at %1 or send email to %2 if you have questions -or need to modify your payment schedule.{/ts} - -{if $customGroup} -{foreach from=$customGroup item=value key=customName} -=========================================================== -{$customName} -=========================================================== -{foreach from=$value item=v key=n} -{$n}: {$v} -{/foreach} -{/foreach} -{/if} diff --git a/xml/templates/message_templates/pledge_reminder_text.tpl b/xml/templates/message_templates/pledge_reminder_text.tpl index 638c0a94cd..e69de29bb2 100644 --- a/xml/templates/message_templates/pledge_reminder_text.tpl +++ b/xml/templates/message_templates/pledge_reminder_text.tpl @@ -1,33 +0,0 @@ -{assign var="greeting" value="{contact.email_greeting_display}"}{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}Payment Due{/ts} - -=========================================================== -{ts}Amount Due{/ts}: {$amount_due|crmMoney:$currency} -{ts}Due Date{/ts}: {$scheduled_payment_date|truncate:10:''|crmDate} - -{if $contribution_page_id} -{capture assign=contributionUrl}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$contribution_page_id`&cid=`{contact.id}`&pledgeId=`$pledge_id`&cs=`$checksumValue`" a=true h=0 fe=1}{/capture} -Click this link to go to a web page where you can make your payment online: -{$contributionUrl} -{else} -{ts}Please mail your payment to{/ts}: -{domain.address} -{/if} - -=========================================================== -{ts}Pledge Information{/ts} - -=========================================================== -{ts}Pledge Received{/ts}: {$create_date|truncate:10:''|crmDate} -{ts}Total Pledge Amount{/ts}: {$amount|crmMoney:$currency} -{ts}Total Paid{/ts}: {$amount_paid|crmMoney:$currency} - -{ts 1='{domain.phone}' 2='{domain.email}'} Please contact us at %1 or send email to %2 if you have questions -or need to modify your payment schedule.{/ts} - - -{ts}Thank you for your generous support.{/ts} diff --git a/xml/templates/message_templates/test_preview_text.tpl b/xml/templates/message_templates/test_preview_text.tpl index 5821007a01..e69de29bb2 100644 --- a/xml/templates/message_templates/test_preview_text.tpl +++ b/xml/templates/message_templates/test_preview_text.tpl @@ -1,7 +0,0 @@ -*********************************************************** - -{ts}Test-drive Email / Receipt{/ts} - -{ts}This is a test-drive email. No live financial transaction has occurred.{/ts} - -*********************************************************** diff --git a/xml/templates/message_templates/uf_notify_text.tpl b/xml/templates/message_templates/uf_notify_text.tpl index be3d1f615d..e69de29bb2 100644 --- a/xml/templates/message_templates/uf_notify_text.tpl +++ b/xml/templates/message_templates/uf_notify_text.tpl @@ -1,11 +0,0 @@ -{ts}Submitted For:{/ts} {$displayName} -{ts}Date:{/ts} {$currentDate} -{ts}Contact Summary:{/ts} {$contactLink} - -=========================================================== -{$grouptitle} - -=========================================================== -{foreach from=$values item=value key=valueName} -{$valueName}: {$value} -{/foreach} -- 2.25.1