From 9f512e1ee08d6a0c313778eba0537dd00be433f9 Mon Sep 17 00:00:00 2001 From: larssandergreen Date: Thu, 25 May 2023 09:55:39 -0600 Subject: [PATCH] Fix PHP8 on participant --- CRM/Event/Form/Participant.php | 3 +- templates/CRM/Event/Form/Participant.tpl | 64 ++++++++++-------------- templates/CRM/Event/Page/Tab.tpl | 2 +- 3 files changed, 30 insertions(+), 39 deletions(-) diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index cfd7a5b2c2..df92a11045 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -1740,7 +1740,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment } $form->assign('onlinePendingContributionId', $form->get('onlinePendingContributionId')); - $form->assign('paid', $form->_isPaidEvent); + $form->assign('paid', $form->_isPaidEvent ?? NULL); $form->addElement('checkbox', 'send_receipt', @@ -2266,6 +2266,7 @@ INNER JOIN civicrm_price_field_value value ON ( value.id = lineItem.price_field_ */ protected function assignUrlPath() { $this->assign('urlPath', 'civicrm/contact/view/participant'); + $this->assign('urlPathVar', NULL); if (!$this->_id && !$this->_contactId) { $breadCrumbs = [ [ diff --git a/templates/CRM/Event/Form/Participant.tpl b/templates/CRM/Event/Form/Participant.tpl index 19c9d2849f..318c6ab59e 100644 --- a/templates/CRM/Event/Form/Participant.tpl +++ b/templates/CRM/Event/Form/Participant.tpl @@ -15,7 +15,7 @@ {* Main event form template *} {else}
- {if $newCredit AND $action EQ 1 AND $participantMode EQ null} + {if $action EQ 1 AND ($context EQ 'participant' OR $context EQ 'standalone') AND $newCredit AND $participantMode EQ null}