From 21443f0bbb32b1cfa6c5473a4948601b39c4f5bc Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 23 Nov 2019 07:35:34 +1100 Subject: [PATCH] Standardise the Grant Search form handling --- CRM/Grant/Form/Search.php | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/CRM/Grant/Form/Search.php b/CRM/Grant/Form/Search.php index 8e1920ba45..40babb0ff3 100644 --- a/CRM/Grant/Form/Search.php +++ b/CRM/Grant/Form/Search.php @@ -75,13 +75,7 @@ class CRM_Grant_Form_Search extends CRM_Core_Form_Search { $this->_done = FALSE; - $this->loadStandardSearchOptionsFromUrl(); - $this->loadFormValues(); - - if ($this->_force) { - $this->postProcess(); - $this->set('force', 0); - } + parent::preProcess(); $this->_queryParams = CRM_Contact_BAO_Query::convertFormValues($this->_formValues); $selector = new CRM_Grant_Selector_Search($this->_queryParams, @@ -156,7 +150,7 @@ class CRM_Grant_Form_Search extends CRM_Core_Form_Search { $this->_done = TRUE; - $this->_formValues = $this->controller->exportValues($this->_name); + $this->setFormValues(); $this->fixFormValues(); if (isset($this->_ssID) && empty($_POST)) { @@ -168,7 +162,6 @@ class CRM_Grant_Form_Search extends CRM_Core_Form_Search { $this->_queryParams = CRM_Contact_BAO_Query::convertFormValues($this->_formValues); - $this->set('formValues', $this->_formValues); $this->set('queryParams', $this->_queryParams); $buttonName = $this->controller->getButtonName(); @@ -213,17 +206,6 @@ class CRM_Grant_Form_Search extends CRM_Core_Form_Search { $controller->run(); } - /** - * Set the default form values. - * - * - * @return array - * the default array reference - */ - public function &setDefaultValues() { - return $this->_formValues; - } - public function fixFormValues() { // if this search has been forced // then see if there are any get values, and if so over-ride the post values @@ -252,13 +234,6 @@ class CRM_Grant_Form_Search extends CRM_Core_Form_Search { } } - /** - * @return null - */ - public function getFormValues() { - return NULL; - } - /** * Return a descriptive name for the page, used in wizard header * -- 2.25.1