dev/financial#59 Fix unreleased regression on batch form
authoreileen <emcnaughton@wikimedia.org>
Wed, 29 May 2019 23:05:54 +0000 (11:05 +1200)
committereileen <emcnaughton@wikimedia.org>
Wed, 29 May 2019 23:15:26 +0000 (11:15 +1200)
I think changing to use the search form as the parent makes sense here. Relying on the parent without including
it feels like a recipe for trouble

CRM/Financial/Form/BatchTransaction.php

index 584ed6a338cb72fdaebcb920fc87c0cf59590983..9071828c32579d720315aae383855573536e390a 100644 (file)
@@ -34,7 +34,7 @@
 /**
  * This class generates form components for Financial Type
  */
-class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form {
+class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form_Search {
   public static $_links = NULL;
   public static $_entityID;
 
@@ -107,30 +107,6 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form {
       }
     }
 
-    // text for sort_name
-    $this->addElement('text',
-      'sort_name',
-      ts('Contributor Name or Email'),
-      CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact',
-        'sort_name'
-      )
-    );
-
-    $this->_group = CRM_Core_PseudoConstant::nestedGroup();
-
-    // multiselect for groups
-    if ($this->_group) {
-      $this->add('select', 'group', ts('Groups'), $this->_group, FALSE,
-        ['id' => 'group', 'multiple' => 'multiple', 'class' => 'crm-select2']
-      );
-    }
-    $contactTags = CRM_Core_BAO_Tag::getTags();
-
-    if ($contactTags) {
-      $this->add('select', 'contact_tags', ts('Tags'), $contactTags, FALSE,
-        ['id' => 'contact_tags', 'multiple' => 'multiple', 'class' => 'crm-select2']
-      );
-    }
     CRM_Contribute_BAO_Query::buildSearchForm($this);
     $this->addElement('checkbox', 'toggleSelects', NULL, NULL);