From 70d744ef3a38d7f4eeb6fddfa1ea47467d6fdd41 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 3 May 2021 07:49:00 +1000 Subject: [PATCH] dev/core#2582 Fix PCP and Pledge template urls in message templates to go to front end site rather than backend --- CRM/Upgrade/Incremental/MessageTemplates.php | 10 ++++++++++ xml/templates/message_templates/pcp_notify_html.tpl | 2 +- xml/templates/message_templates/pcp_notify_text.tpl | 2 +- .../message_templates/pledge_reminder_html.tpl | 2 +- .../message_templates/pledge_reminder_text.tpl | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CRM/Upgrade/Incremental/MessageTemplates.php b/CRM/Upgrade/Incremental/MessageTemplates.php index 6958deaa82cd..441b068f1ec4 100644 --- a/CRM/Upgrade/Incremental/MessageTemplates.php +++ b/CRM/Upgrade/Incremental/MessageTemplates.php @@ -239,6 +239,16 @@ protected function getTemplateUpdates() { ['name' => 'petition_confirmation_needed', 'type' => 'html'], ], ], + [ + 'version' => '5.38.alpha1', + 'upgrade_descriptor' => ts('Fix Pledge and PCP urls to go to the front end site rather than backend site'), + 'templates' => [ + ['name' => 'pcp_notify', 'type' => 'html'], + ['name' => 'pcp_notify', 'type' => 'text'], + ['name' => 'pledge_reminder', 'type' => 'html'], + ['name' => 'pledge_reminder', 'type' => 'text'], + ], + ], ]; } diff --git a/xml/templates/message_templates/pcp_notify_html.tpl b/xml/templates/message_templates/pcp_notify_html.tpl index c1d8fd4669b3..01c8ea50b6a4 100644 --- a/xml/templates/message_templates/pcp_notify_html.tpl +++ b/xml/templates/message_templates/pcp_notify_html.tpl @@ -9,7 +9,7 @@ {capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture} {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} -{capture assign=pcpURL }{crmURL p="civicrm/pcp/info" q="reset=1&id=`$pcpId`" h=0 a=1}{/capture} +{capture assign=pcpURL }{crmURL p="civicrm/pcp/info" q="reset=1&id=`$pcpId`" h=0 a=1 fe=1}{/capture}
diff --git a/xml/templates/message_templates/pcp_notify_text.tpl b/xml/templates/message_templates/pcp_notify_text.tpl index 52f9761e58c4..93b18d24e091 100644 --- a/xml/templates/message_templates/pcp_notify_text.tpl +++ b/xml/templates/message_templates/pcp_notify_text.tpl @@ -5,7 +5,7 @@ {ts}Action{/ts}: {if $mode EQ 'Update'}{ts}Updated personal campaign page{/ts}{else}{ts}New personal campaign page{/ts}{/if} {ts}Personal Campaign Page Title{/ts}: {$pcpTitle} {ts}Current Status{/ts}: {$pcpStatus} -{capture assign=pcpURL}{crmURL p="civicrm/pcp/info" q="reset=1&id=`$pcpId`" h=0 a=1}{/capture} +{capture assign=pcpURL}{crmURL p="civicrm/pcp/info" q="reset=1&id=`$pcpId`" h=0 a=1 fe=1}{/capture} {ts}View Page{/ts}: >> {$pcpURL} diff --git a/xml/templates/message_templates/pledge_reminder_html.tpl b/xml/templates/message_templates/pledge_reminder_html.tpl index b6f883bc653a..c5ff4ab8a710 100644 --- a/xml/templates/message_templates/pledge_reminder_html.tpl +++ b/xml/templates/message_templates/pledge_reminder_html.tpl @@ -48,7 +48,7 @@
{if $contribution_page_id} - {capture assign=contributionUrl}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$contribution_page_id`&cid=`$contact.contact_id`&pledgeId=`$pledge_id`&cs=`$checksumValue`" a=true h=0}{/capture} + {capture assign=contributionUrl}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$contribution_page_id`&cid=`$contact.contact_id`&pledgeId=`$pledge_id`&cs=`$checksumValue`" a=true h=0 fe=1}{/capture}

{ts}Go to a web page where you can make your payment online{/ts}

{else}

{ts}Please mail your payment to{/ts}: {$domain.address}

diff --git a/xml/templates/message_templates/pledge_reminder_text.tpl b/xml/templates/message_templates/pledge_reminder_text.tpl index 6ff194224f21..54c532df7f2a 100644 --- a/xml/templates/message_templates/pledge_reminder_text.tpl +++ b/xml/templates/message_templates/pledge_reminder_text.tpl @@ -10,7 +10,7 @@ {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.contact_id`&pledgeId=`$pledge_id`&cs=`$checksumValue`" a=true h=0}{/capture} +{capture assign=contributionUrl}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$contribution_page_id`&cid=`$contact.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}