From 5047199549919041b13bed9e8cdbdea5669efbbe Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Wed, 7 Oct 2015 12:21:30 +0530 Subject: [PATCH] CRM-17348 - add Advcheckbox in addfield() --- CRM/Contact/Form/Edit/Email.php | 2 +- CRM/Core/Form.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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') { -- 2.25.1