From 239a5027d0ab415165ba2a681b941291b1bd05d2 Mon Sep 17 00:00:00 2001 From: Pratik Joshi Date: Thu, 10 Oct 2013 16:25:52 +0530 Subject: [PATCH] CRM-13563 fix: exclude the 'save and new' button on form for group search context ---------------------------------------- * CRM-13563: Registering a group of contacts for an event from Manage group option gets error when "Save and New" button is selected. http://issues.civicrm.org/jira/browse/CRM-13563 --- CRM/Event/Form/Participant.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index 7886da1e95..f2488d5a98 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -924,7 +924,11 @@ loadCampaign( {$this->_eID}, {$eventCampaigns} ); ); $path = CRM_Utils_System::currentPath(); - if (strpos($path, 'civicrm/contact/search') !== 0) { + $excludeForPaths = array( + 'civicrm/contact/search', + 'civicrm/group/search' + ); + if (!in_array($path, $excludeForPaths)) { $buttons[] = array( 'type' => 'upload', 'name' => ts('Save and New'), @@ -932,6 +936,7 @@ loadCampaign( {$this->_eID}, {$eventCampaigns} ); 'js' => $confirmJS, ); } + $buttons[] = array( 'type' => 'cancel', 'name' => ts('Cancel'), -- 2.25.1