Fix contact sub-type profile field to use select2
authorColeman Watts <coleman@civicrm.org>
Fri, 10 Jul 2015 19:05:34 +0000 (15:05 -0400)
committerColeman Watts <coleman@civicrm.org>
Fri, 10 Jul 2015 19:05:34 +0000 (15:05 -0400)
CRM/Core/BAO/UFGroup.php

index 137c57dfedb810dcc86b8faf886df170468ff0c2..5f18788fdcd1d88ef42ab4d73b3be8be5badf640 100644 (file)
@@ -2022,8 +2022,7 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
         $subtypeList = $subtypes;
       }
 
-      $sel = $form->add('select', $name, $title, $subtypeList, $required);
-      $sel->setMultiple(TRUE);
+      $form->add('select', $name, $title, $subtypeList, $required, array('class' => 'crm-select2', 'multiple' => TRUE));
     }
     elseif (in_array($fieldName, CRM_Contact_BAO_Contact::$_greetingTypes)) {
       //add email greeting, postal greeting, addressee, CRM-4575