From: jitendrapurohit Date: Wed, 7 Oct 2015 06:51:30 +0000 (+0530) Subject: CRM-17348 - add Advcheckbox in addfield() X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5047199549919041b13bed9e8cdbdea5669efbbe;p=civicrm-core.git CRM-17348 - add Advcheckbox in addfield() --- diff --git a/CRM/Contact/Form/Edit/Email.php b/CRM/Contact/Form/Edit/Email.php index b5987b2d0b..7a018cf58e 100644 --- a/CRM/Contact/Form/Edit/Email.php +++ b/CRM/Contact/Form/Edit/Email.php @@ -77,7 +77,7 @@ class CRM_Contact_Form_Edit_Email { $form->addElement('select', "email[$blockId][on_hold]", '', $holdOptions); } else { - $form->addField("email[$blockId][on_hold]", array('entity' => 'email')); + $form->addField("email[$blockId][on_hold]", array('entity' => 'email', 'type' => 'advcheckbox')); } //Bulkmail checkbox diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index c63b6db240..8b6f031aed 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1458,6 +1458,10 @@ class CRM_Core_Form extends HTML_QuickForm_Page { unset($props['text']); return $this->addElement('checkbox', $name, $label, $text, $props); + //add support for 'Advcheckbox' field + case 'advcheckbox': + return $this->addElement('advcheckbox', $name, NULL); + case 'File': // We should not build upload file in search mode. if (isset($props['context']) && $props['context'] == 'search') {