CRM-13966 - Form cleanup
authorColeman Watts <coleman@civicrm.org>
Mon, 10 Feb 2014 18:18:28 +0000 (10:18 -0800)
committerColeman Watts <coleman@civicrm.org>
Mon, 10 Feb 2014 18:18:28 +0000 (10:18 -0800)
CRM/Activity/BAO/Query.php
CRM/Contribute/BAO/Query.php

index 7e96aaf01f0ddef297928a8ae9ad963d51260f9b..086c85849bd4b2bf40b44f80dd2b5d6f7f142aff 100644 (file)
@@ -520,12 +520,7 @@ class CRM_Activity_BAO_Query {
       CRM_Campaign_BAO_Campaign::accessCampaign()
     ) {
       $buildEngagementLevel = TRUE;
-      $form->add('select', 'activity_engagement_level',
-        ts('Engagement Index'),
-        array('' => ts('- any -')) + CRM_Campaign_PseudoConstant::engagementLevel(),
-        FALSE,
-        array('class' => 'crm-select2')
-      );
+      $form->addSelect('activity_engagement_level', array('entity' => 'activity', 'option_url' => NULL));
 
       // Add survey result field.
       $optionGroups  = CRM_Campaign_BAO_Survey::getResultSets( 'name' );
index d0a98a8640eb6752494998dd9e9d769579f4ba8d..8738de29fe240cda0e4d8ded7fda7159c01f6ca5 100644 (file)
@@ -757,10 +757,8 @@ class CRM_Contribute_BAO_Query {
     );
 
     // CRM-13848
-    $form->add('select', 'financial_type_id',
-      ts('Financial Type'),
-      CRM_Contribute_PseudoConstant::financialType(), FALSE,
-        array('id' => 'financial_type_id', 'multiple' => 'multiple', 'class' => 'crm-select2')
+    $form->addSelect('financial_type_id',
+      array('entity' => 'contribution', 'multiple' => 'multiple', 'option_url' => NULL, 'placeholder' => ts('- any -'))
     );
 
     $form->add('select', 'contribution_page_id',
@@ -809,7 +807,7 @@ class CRM_Contribute_BAO_Query {
 
     // Recurring contribution fields
     foreach (self::getRecurringFields() as $key => $label) {
-      CRM_Core_Form_Date::buildDateRange($form, $key, 1, '_low', '_high', $label, FALSE);
+      CRM_Core_Form_Date::buildDateRange($form, $key, 1, '_low', '_high');
       // If data has been entered for a recurring field, tell the tpl layer to open the pane
       if (!empty($form->_formValues[$key . '_relative']) || !empty($form->_formValues[$key . '_low']) || !empty($form->_formValues[$key . '_high'])) {
         $form->assign('contribution_recur_pane_open', TRUE);