CRM-17348 - add Advcheckbox in addfield()
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 7 Oct 2015 06:51:30 +0000 (12:21 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 7 Oct 2015 06:51:30 +0000 (12:21 +0530)
CRM/Contact/Form/Edit/Email.php
CRM/Core/Form.php

index b5987b2d0ba4b042b2d6cd8841cc49f876f89a80..7a018cf58e8fe5d98e8842a8811ea1c0c67ae1f2 100644 (file)
@@ -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
index c63b6db240520c607756be1202d5b55a24dd0dfd..8b6f031aedbcfd86b2b7b93b6c391530cb1aed30 100644 (file)
@@ -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') {