From e6ac9af90bfa60137550d3ba68a6c81e2034c83b Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" Date: Thu, 29 Nov 2018 10:20:25 +0000 Subject: [PATCH] Fix links for tabs on manage event (events use separate URLs for each tab but need selectedChild to be specified or the default tab is loaded --- CRM/Event/Form/ManageEvent/EventInfo.php | 1 + CRM/Event/Form/ManageEvent/Fee.php | 1 + CRM/Event/Form/ManageEvent/Location.php | 1 + CRM/Event/Form/ManageEvent/Registration.php | 1 + CRM/Event/Form/ManageEvent/Repeat.php | 1 + CRM/Event/Form/ManageEvent/ScheduleReminders.php | 1 + CRM/Friend/Form/Event.php | 1 + CRM/PCP/Form/Event.php | 1 + 8 files changed, 8 insertions(+) diff --git a/CRM/Event/Form/ManageEvent/EventInfo.php b/CRM/Event/Form/ManageEvent/EventInfo.php index 4ca39edf26..b1f0d7816f 100644 --- a/CRM/Event/Form/ManageEvent/EventInfo.php +++ b/CRM/Event/Form/ManageEvent/EventInfo.php @@ -45,6 +45,7 @@ class CRM_Event_Form_ManageEvent_EventInfo extends CRM_Event_Form_ManageEvent { */ public function preProcess() { parent::preProcess(); + $this->assign('selectedChild', 'settings'); if ($this->_id) { $this->assign('entityID', $this->_id); diff --git a/CRM/Event/Form/ManageEvent/Fee.php b/CRM/Event/Form/ManageEvent/Fee.php index 10c4e23d73..e477d320ab 100644 --- a/CRM/Event/Form/ManageEvent/Fee.php +++ b/CRM/Event/Form/ManageEvent/Fee.php @@ -60,6 +60,7 @@ class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent { */ public function preProcess() { parent::preProcess(); + $this->assign('selectedChild', 'fee'); } /** diff --git a/CRM/Event/Form/ManageEvent/Location.php b/CRM/Event/Form/ManageEvent/Location.php index d28b2187fd..602c1f991b 100644 --- a/CRM/Event/Form/ManageEvent/Location.php +++ b/CRM/Event/Form/ManageEvent/Location.php @@ -72,6 +72,7 @@ class CRM_Event_Form_ManageEvent_Location extends CRM_Event_Form_ManageEvent { */ public function preProcess() { parent::preProcess(); + $this->assign('selectedChild', 'location'); $this->_values = $this->get('values'); if ($this->_id && empty($this->_values)) { diff --git a/CRM/Event/Form/ManageEvent/Registration.php b/CRM/Event/Form/ManageEvent/Registration.php index a39bc136a5..58aae9eea8 100644 --- a/CRM/Event/Form/ManageEvent/Registration.php +++ b/CRM/Event/Form/ManageEvent/Registration.php @@ -55,6 +55,7 @@ class CRM_Event_Form_ManageEvent_Registration extends CRM_Event_Form_ManageEvent $this->_profileBottomNumAdd = CRM_Utils_Array::value('addProfileNumAdd', $_GET, 0); parent::preProcess(); + $this->assign('selectedChild', 'registration'); $this->assign('addProfileBottom', $this->_addProfileBottom); $this->assign('profileBottomNum', $this->_profileBottomNum); diff --git a/CRM/Event/Form/ManageEvent/Repeat.php b/CRM/Event/Form/ManageEvent/Repeat.php index 5d1bb1dfb1..e95c2245a0 100644 --- a/CRM/Event/Form/ManageEvent/Repeat.php +++ b/CRM/Event/Form/ManageEvent/Repeat.php @@ -25,6 +25,7 @@ class CRM_Event_Form_ManageEvent_Repeat extends CRM_Event_Form_ManageEvent { public function preProcess() { parent::preProcess(); + $this->assign('selectedChild', 'repeat'); $this->assign('currentEventId', $this->_id); $checkParentExistsForThisId = CRM_Core_BAO_RecurringEntity::getParentFor($this->_id, 'civicrm_event'); diff --git a/CRM/Event/Form/ManageEvent/ScheduleReminders.php b/CRM/Event/Form/ManageEvent/ScheduleReminders.php index 475a037671..1be9f47162 100644 --- a/CRM/Event/Form/ManageEvent/ScheduleReminders.php +++ b/CRM/Event/Form/ManageEvent/ScheduleReminders.php @@ -47,6 +47,7 @@ class CRM_Event_Form_ManageEvent_ScheduleReminders extends CRM_Event_Form_Manage */ public function preProcess() { parent::preProcess(); + $this->assign('selectedChild', 'reminder'); $setTab = CRM_Utils_Request::retrieve('setTab', 'Int', $this, FALSE, 0); $mapping = CRM_Utils_Array::first(CRM_Core_BAO_ActionSchedule::getMappings(array( diff --git a/CRM/Friend/Form/Event.php b/CRM/Friend/Form/Event.php index 87e336bad8..253be69ccc 100644 --- a/CRM/Friend/Form/Event.php +++ b/CRM/Friend/Form/Event.php @@ -48,6 +48,7 @@ class CRM_Friend_Form_Event extends CRM_Event_Form_ManageEvent { public function preProcess() { parent::preProcess(); + $this->assign('selectedChild', 'friend'); } /** diff --git a/CRM/PCP/Form/Event.php b/CRM/PCP/Form/Event.php index 74ae82e491..4e0e51977d 100644 --- a/CRM/PCP/Form/Event.php +++ b/CRM/PCP/Form/Event.php @@ -49,6 +49,7 @@ class CRM_PCP_Form_Event extends CRM_Event_Form_ManageEvent { public function preProcess() { parent::preProcess(); + $this->assign('selectedChild', 'pcp'); } /** -- 2.25.1