From 787de6ef0e1c062c397221fa7f0c51c2a41234b4 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sun, 3 Dec 2023 14:53:44 +1300 Subject: [PATCH] Standardise some more event template tokens --- CRM/Event/Form/Registration/Confirm.php | 1 + .../event_online_receipt_text.tpl | 3 -- .../event_online_receipt_html.tpl | 32 ++++++++++--------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CRM/Event/Form/Registration/Confirm.php b/CRM/Event/Form/Registration/Confirm.php index daec9350a1..87827b09de 100644 --- a/CRM/Event/Form/Registration/Confirm.php +++ b/CRM/Event/Form/Registration/Confirm.php @@ -884,6 +884,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { $this->assign('lineItem', $lineItem); } $this->_values['params']['additionalParticipant'] = TRUE; + // Removed from tpl in 5.67 $this->assign('isAdditionalParticipant', $this->_values['params']['additionalParticipant']); } diff --git a/tests/templates/message_templates/event_online_receipt_text.tpl b/tests/templates/message_templates/event_online_receipt_text.tpl index 526ea892b5..68db685a1c 100644 --- a/tests/templates/message_templates/event_online_receipt_text.tpl +++ b/tests/templates/message_templates/event_online_receipt_text.tpl @@ -20,9 +20,6 @@ is_pay_later:::{$is_pay_later} {if !empty($isAmountzero)} isAmountzero:::{$isAmountzero} {/if} -{if !empty($isAdditionalParticipant)} -isAdditionalParticipant:::{$isAdditionalParticipant} -{/if} {if !empty($pay_later_receipt)} pay_later_receipt:::{$pay_later_receipt} {/if} diff --git a/xml/templates/message_templates/event_online_receipt_html.tpl b/xml/templates/message_templates/event_online_receipt_html.tpl index 5cbff73e50..f9cd1b0bc6 100644 --- a/xml/templates/message_templates/event_online_receipt_html.tpl +++ b/xml/templates/message_templates/event_online_receipt_html.tpl @@ -43,10 +43,10 @@ {/if} {elseif !empty($isRequireApproval)}

{ts}Your registration has been submitted.{/ts}

- {if $isPrimary} -

{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}

- {/if} - {elseif !empty($is_pay_later) && empty($isAmountzero) && empty($isAdditionalParticipant)} + {if $isPrimary} +

{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}

+ {/if} + {elseif {contribution.is_pay_later|boolean} && {contribution.balance_amount|boolean} && $isPrimary}

{if {event.pay_later_receipt|boolean}}{event.pay_later_receipt}{/if}

{/if} @@ -77,7 +77,7 @@ {/if} - {if !empty($isShowLocation)} + {if {event.is_show_location|boolean}} {event.location} @@ -334,35 +334,35 @@ {/if} - {if !empty($receive_date)} + {if {contribution.receive_date|boolean}} {ts}Transaction Date{/ts} - {$receive_date|crmDate} + {contribution.receive_date} {/if} - {if !empty($financialTypeName)} + {if {contribution.financial_type_id|boolean}} {ts}Financial Type{/ts} - {$financialTypeName} + {contribution.financial_type_id:label} {/if} - {if !empty($trxn_id)} + {if {contribution.trxn_id|boolean}} {ts}Transaction #{/ts} - {$trxn_id} + {contribution.trxn_id|boolean} {/if} @@ -378,13 +378,13 @@ {/if} - {if !empty($checkNumber)} + {if {contribution.check_number|boolean}} {ts}Check Number{/ts} - {$checkNumber} + {contribution.check_number} {/if} @@ -471,10 +471,12 @@ {/if} - {if !empty($event.allow_selfcancelxfer)} + {if {event.allow_selfcancelxfer|boolean}} - {ts 1=$selfcancelxfer_time 2=$selfservice_preposition}You may transfer your registration to another participant or cancel your registration up to %1 hours %2 the event.{/ts} {if !empty($totalAmount)}{ts}Cancellations are not refundable.{/ts}{/if}
+ {capture assign=selfservice_preposition}{if {event.selfcancelxfer_time} > 0}{ts}before{/ts}{else}{ts}after{/ts}{/if}{/capture} + {ts 1={event.selfcancelxfer_time} 2=$selfservice_preposition}You may transfer your registration to another participant or cancel your registration up to %1 hours %2 the event.{/ts} + {if {contribution.paid_amount|boolean}}{ts}Cancellations are not refundable.{/ts}{/if}
{capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid={participant.id}&{contact.checksum}" h=0 a=1 fe=1}{/capture} {ts}Click here to transfer or cancel your registration.{/ts} -- 2.25.1