Campaign Query - search form tweaks adding select2
authorColeman Watts <coleman@civicrm.org>
Tue, 25 Feb 2014 21:40:08 +0000 (16:40 -0500)
committerColeman Watts <coleman@civicrm.org>
Tue, 25 Feb 2014 21:40:08 +0000 (16:40 -0500)
CRM/Campaign/BAO/Query.php

index 0b83b735665710a566a954586e4daeb3a9502009..b51897b67e6f979bfadf6c931c8ce6adeab5f496 100755 (executable)
@@ -401,11 +401,11 @@ INNER JOIN  civicrm_custom_group grp on fld.custom_group_id = grp.id
     //campaign has some contact groups, don't
     //allow to search the contacts those are not
     //in given campaign groups ( ie not in constituents )
-    $groupJs = NULL;
+    $props = array('class' => 'crm-select2');
     if ($form->get('searchVoterFor') == 'reserve') {
-      $groupJs = array('onChange' => "buildCampaignGroups( );return false;");
+      $props['onChange'] = "buildCampaignGroups( );return false;";
     }
-    $form->add('select', 'campaign_survey_id', ts('Survey'), $surveys, TRUE, $groupJs);
+    $form->add('select', 'campaign_survey_id', ts('Survey'), $surveys, TRUE, $props);
   }
 
   /*