From 1db1f8e3d0f8d8b5a88536889ddaed66ec2a2abd Mon Sep 17 00:00:00 2001 From: eileen Date: Sat, 5 Dec 2020 15:07:50 +1300 Subject: [PATCH] Additional fix --- CRM/Event/Form/Participant.php | 3 +++ CRM/Event/Form/Task/Register.php | 2 +- CRM/Event/Page/Tab.php | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index 2ab5a13a40..a42a8d1b1d 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -367,6 +367,9 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment // when fee amount is included in form if (!empty($_POST['hidden_feeblock']) || !empty($_POST['send_receipt'])) { + if ($this->_submitValues['event_id']) { + $this->_eventId = $this->_submitValues['event_id']; + } CRM_Event_Form_EventFees::preProcess($this); $this->buildEventFeeForm($this); CRM_Event_Form_EventFees::setDefaultValues($this); diff --git a/CRM/Event/Form/Task/Register.php b/CRM/Event/Form/Task/Register.php index b13a5619db..e9ca978c2f 100644 --- a/CRM/Event/Form/Task/Register.php +++ b/CRM/Event/Form/Task/Register.php @@ -71,7 +71,7 @@ class CRM_Event_Form_Task_Register extends CRM_Event_Form_Participant { $this->_contactId = NULL; //set ajax path, this used for custom data building - $this->assign('urlPath', $urlString); + $this->assign('urlPath', 'civicrm/contact/view/participant'); $this->assign('urlPathVar', "_qf_Participant_display=true&qfKey={$this->controller->_key}"); } diff --git a/CRM/Event/Page/Tab.php b/CRM/Event/Page/Tab.php index 0ecd0f8063..2c75b80d2d 100644 --- a/CRM/Event/Page/Tab.php +++ b/CRM/Event/Page/Tab.php @@ -90,7 +90,7 @@ class CRM_Event_Page_Tab extends CRM_Core_Page { $controller = new CRM_Core_Controller_Simple( 'CRM_Event_Form_Participant', 'Create Participation', - $this->_action + $this->_action, FALSE, FALSE, TRUE ); $controller->setEmbedded(TRUE); @@ -122,7 +122,7 @@ class CRM_Event_Page_Tab extends CRM_Core_Page { $this->_action = CRM_Core_Action::ADD; } else { - $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE); + $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this); $this->assign('contactId', $this->_contactId); // check logged in url permission -- 2.25.1