Skip to content

Commit

Permalink
Merge pull request #20203 from seamuslee001/dev_core_2582
Browse files Browse the repository at this point in the history
dev/core#2582 Fix PCP and Pledge template urls in message templates t…
  • Loading branch information
eileenmcnaughton authored May 3, 2021
2 parents 41ac307 + 70d744e commit 81e6c37
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions CRM/Upgrade/Incremental/MessageTemplates.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
],
],
];
}

Expand Down
2 changes: 1 addition & 1 deletion xml/templates/message_templates/pcp_notify_html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}

<center>
<table id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left; width:100%; max-width:700px; padding:0; margin:0; border:0px;">
Expand Down
2 changes: 1 addition & 1 deletion xml/templates/message_templates/pcp_notify_text.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
2 changes: 1 addition & 1 deletion xml/templates/message_templates/pledge_reminder_html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<tr>
<td>
{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}
<p><a href="{$contributionUrl}">{ts}Go to a web page where you can make your payment online{/ts}</a></p>
{else}
<p>{ts}Please mail your payment to{/ts}: {$domain.address}</p>
Expand Down
2 changes: 1 addition & 1 deletion xml/templates/message_templates/pledge_reminder_text.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 81e6c37

Please sign in to comment.