diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index cfd7a5b2c227..df92a1104571 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -1740,7 +1740,7 @@ public function buildEventFeeForm($form) { } $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 @@ public function getFeeDetails($participantIds, $hasLineItems = FALSE) { */ 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 19c9d2849f23..318c6ab59e8b 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}