From: Coleman Watts Date: Tue, 25 Feb 2014 21:40:08 +0000 (-0500) Subject: Campaign Query - search form tweaks adding select2 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4145f041de97d9cdc2b96f4ea6f3fb5d7d2e96c6;p=civicrm-core.git Campaign Query - search form tweaks adding select2 --- diff --git a/CRM/Campaign/BAO/Query.php b/CRM/Campaign/BAO/Query.php index 0b83b73566..b51897b67e 100755 --- a/CRM/Campaign/BAO/Query.php +++ b/CRM/Campaign/BAO/Query.php @@ -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); } /*