CRM-18154: change checkbox to advcheckbox to ensure unsetting works fine
authoryashodha <yashodha.chaku@webaccessglobal.com>
Thu, 5 May 2016 07:44:35 +0000 (13:14 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Thu, 5 May 2016 07:44:35 +0000 (13:14 +0530)
----------------------------------------
* CRM-18154: Profile custom field option: "Include in multi-record listing" un-ticked, but still persists
  https://issues.civicrm.org/jira/browse/CRM-18154

CRM/Custom/Form/Field.php

index c3d7d85eb85f9eed1e3589b31411ff26698233bb..81676a071db2780ceb0da9f3d5ae35ca1b2d047e 100644 (file)
@@ -486,7 +486,7 @@ class CRM_Custom_Form_Field extends CRM_Core_Form {
     $this->addRule('weight', ts('is a numeric field'), 'numeric');
 
     // is required ?
-    $this->add('checkbox', 'is_required', ts('Required?'));
+    $this->add('advcheckbox', 'is_required', ts('Required?'));
 
     // checkbox / radio options per line
     $this->add('text', 'options_per_line', ts('Options Per Line'));
@@ -510,10 +510,10 @@ class CRM_Custom_Form_Field extends CRM_Core_Form {
     $this->add('advcheckbox', 'is_active', ts('Active?'));
 
     // is active ?
-    $this->add('checkbox', 'is_view', ts('View Only?'));
+    $this->add('advcheckbox', 'is_view', ts('View Only?'));
 
     // is searchable ?
-    $this->addElement('checkbox',
+    $this->addElement('advcheckbox',
       'is_searchable',
       ts('Is this Field Searchable?'),
       NULL, array('onclick' => "showSearchRange(this)")