From 74b187a26f73371c1c2dc1ef9707184f7a345f55 Mon Sep 17 00:00:00 2001 From: Kirk Jackson Date: Thu, 14 Nov 2013 16:02:51 +0000 Subject: [PATCH] Enable participant roles to be changed from counted to not counted --- CRM/Admin/Form/Options.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CRM/Admin/Form/Options.php b/CRM/Admin/Form/Options.php index 50f413e46f..ec2f9327fd 100644 --- a/CRM/Admin/Form/Options.php +++ b/CRM/Admin/Form/Options.php @@ -395,9 +395,13 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { } } - // set db value of filter in params if filter is non editable - if ($this->_id && !array_key_exists('filter', $params) && !$this->_gName == 'participant_role') { - $params['filter'] = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $this->_id, 'filter', 'id'); + // set value of filter if not present in params + if ($this->_id && !array_key_exists('filter', $params)) { + if ($this->_gName == 'participant_role') { + $params['filter'] = 0; + } else { + $params['filter'] = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $this->_id, 'filter', 'id'); + } } $groupParams = array('name' => ($this->_gName)); -- 2.25.1