Skip to content

Commit

Permalink
Merge pull request #15931 from seamuslee001/standardise_grant_search
Browse files Browse the repository at this point in the history
[REF] Standardise the Grant Search form handling
  • Loading branch information
eileenmcnaughton authored Nov 29, 2019
2 parents f517816 + 21443f0 commit 6ffe613
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions CRM/Grant/Form/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,7 @@ public function preProcess() {

$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,
Expand Down Expand Up @@ -156,7 +150,7 @@ public function postProcess() {

$this->_done = TRUE;

$this->_formValues = $this->controller->exportValues($this->_name);
$this->setFormValues();
$this->fixFormValues();

if (isset($this->_ssID) && empty($_POST)) {
Expand All @@ -168,7 +162,6 @@ public function postProcess() {

$this->_queryParams = CRM_Contact_BAO_Query::convertFormValues($this->_formValues);

$this->set('formValues', $this->_formValues);
$this->set('queryParams', $this->_queryParams);

$buttonName = $this->controller->getButtonName();
Expand Down Expand Up @@ -213,17 +206,6 @@ public function postProcess() {
$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
Expand Down Expand Up @@ -252,13 +234,6 @@ public function fixFormValues() {
}
}

/**
* @return null
*/
public function getFormValues() {
return NULL;
}

/**
* Return a descriptive name for the page, used in wizard header
*
Expand Down

0 comments on commit 6ffe613

Please sign in to comment.