From: Kirk Jackson Date: Thu, 14 Nov 2013 16:02:51 +0000 (+0000) Subject: Enable participant roles to be changed from counted to not counted X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=74b187a26f73371c1c2dc1ef9707184f7a345f55;p=civicrm-core.git Enable participant roles to be changed from counted to not counted --- 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));