From 7dcb9f55e6f180c417f9d9fa201efd42aa6dd82f Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 4 May 2014 19:47:41 -0400 Subject: [PATCH] CRM-14612 - Fix relationship permission checkboxes --- CRM/Contact/Form/Relationship.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Relationship.php b/CRM/Contact/Form/Relationship.php index 731ea222fe..fa83d3b7db 100644 --- a/CRM/Contact/Form/Relationship.php +++ b/CRM/Contact/Form/Relationship.php @@ -367,8 +367,9 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form { $this->add('advcheckbox', 'is_active', ts('Enabled?')); - $this->add('advcheckbox', 'is_permission_a_b'); - $this->add('advcheckbox', 'is_permission_b_a'); + // CRM-14612 - Don't use adv-checkbox as it interferes with the form js + $this->add('checkbox', 'is_permission_a_b'); + $this->add('checkbox', 'is_permission_b_a'); $this->add('text', 'description', ts('Description'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Relationship', 'description')); @@ -419,6 +420,10 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form { $relationshipTypeId = str_replace(array('_', 'a', 'b'), '', $params['relationship_type_id']); + // CRM-14612 - Don't use adv-checkbox as it interferes with the form js + $params['is_permission_a_b'] = CRM_Utils_Array::value('is_permission_a_b', $params, 0); + $params['is_permission_b_a'] = CRM_Utils_Array::value('is_permission_b_a', $params, 0); + // Update mode (always single) if ($this->_action & CRM_Core_Action::UPDATE) { $ids['relationship'] = $this->_relationshipId; -- 2.25.1