From 15cf9198644bbd7a94f230335b3c79716e49a274 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 10 Feb 2014 10:18:28 -0800 Subject: [PATCH] CRM-13966 - Form cleanup --- CRM/Activity/BAO/Query.php | 7 +------ CRM/Contribute/BAO/Query.php | 8 +++----- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/CRM/Activity/BAO/Query.php b/CRM/Activity/BAO/Query.php index 7e96aaf01f..086c85849b 100644 --- a/CRM/Activity/BAO/Query.php +++ b/CRM/Activity/BAO/Query.php @@ -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' ); diff --git a/CRM/Contribute/BAO/Query.php b/CRM/Contribute/BAO/Query.php index d0a98a8640..8738de29fe 100644 --- a/CRM/Contribute/BAO/Query.php +++ b/CRM/Contribute/BAO/Query.php @@ -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); -- 2.25.1