From 8c9c57420bc61bb87d9d54ff99c56588ecc7c5cd Mon Sep 17 00:00:00 2001 From: Stephen Palmstrom Date: Wed, 9 Mar 2022 18:07:18 +0000 Subject: [PATCH] Issue 3085 --- CRM/UF/Form/AdvanceSetting.php | 8 ++++---- CRM/UF/Form/Group.php | 7 +------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/CRM/UF/Form/AdvanceSetting.php b/CRM/UF/Form/AdvanceSetting.php index b78c0c5b86..56a247a916 100644 --- a/CRM/UF/Form/AdvanceSetting.php +++ b/CRM/UF/Form/AdvanceSetting.php @@ -29,7 +29,7 @@ class CRM_UF_Form_AdvanceSetting extends CRM_UF_Form_Group { $form->assign('advancedFieldsConverted', $entityFields); // should mapping be enabled for this group - $form->addElement('checkbox', 'is_map', ts('Enable mapping for this profile?')); + $form->addElement('advcheckbox', 'is_map', ts('Enable mapping for this profile?')); // should we allow updates on a exisitng contact $form->addRadio('is_update_dupe', ts('What to do upon duplicate match'), [ts('Issue warning and do not save'), ts('Update the matching contact'), ts('Allow duplicate contact to be created')]); @@ -50,14 +50,14 @@ class CRM_UF_Form_AdvanceSetting extends CRM_UF_Form_Group { $form->addElement('select', 'add_contact_to_group', ts('Add contacts to a group?'), $group); // add CAPTCHA To this group ? - $form->addElement('checkbox', 'add_captcha', ts('Include reCAPTCHA?')); + $form->addElement('advcheckbox', 'add_captcha', ts('Include reCAPTCHA?')); // should we display an edit link - $form->addElement('checkbox', 'is_edit_link', ts('Include profile edit links in search results?')); + $form->addElement('advcheckbox', 'is_edit_link', ts('Include profile edit links in search results?')); // should we display a link to the website profile $config = CRM_Core_Config::singleton(); - $form->addElement('checkbox', 'is_uf_link', ts('Include %1 user account information links in search results?', [1 => $config->userFramework])); + $form->addElement('advcheckbox', 'is_uf_link', ts('Include %1 user account information links in search results?', [1 => $config->userFramework])); // want to create cms user $session = CRM_Core_Session::singleton(); diff --git a/CRM/UF/Form/Group.php b/CRM/UF/Form/Group.php index 3b9b39132d..454a019c59 100644 --- a/CRM/UF/Form/Group.php +++ b/CRM/UF/Form/Group.php @@ -199,7 +199,7 @@ class CRM_UF_Form_Group extends CRM_Core_Form { $this->addRule('weight', ts('is a numeric field'), 'numeric'); // is this group active ? - $this->addElement('checkbox', 'is_active', ts('Is this CiviCRM Profile active?')); + $this->addElement('advcheckbox', 'is_active', ts('Is this CiviCRM Profile active?')); $paneNames = [ ts('Advanced Settings') => 'buildAdvanceSetting', @@ -362,11 +362,6 @@ class CRM_UF_Form_Group extends CRM_Core_Form { else { // get the submitted form values. $params = $this->controller->exportValues($this->_name); - - if (!array_key_exists('is_active', $params)) { - $params['is_active'] = 0; - } - if ($this->_action & (CRM_Core_Action::UPDATE)) { $params['id'] = $this->_id; // CRM-5284 -- 2.25.1