Skip to content
Snippets Groups Projects
Commit 5e0fa1fc authored by eileen's avatar eileen
Browse files

Fix notices when rendering advanced search as contributions

Ensure contributionSummary is assigned to the template and
check if it is empty
parent 01b723ff
Branches
Tags
No related merge requests found
......@@ -193,7 +193,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
return (bool) $searchContext;
}
public static function setModeValues() {
public static function setModeValues(): void {
self::$_modeValues = [
CRM_Contact_BAO_Query::MODE_CONTACTS => [
'selectorName' => self::$_selectorName,
......@@ -214,6 +214,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
'resultContext' => 'Search',
'taskClassName' => 'CRM_Contribute_Task',
'component' => 'CiviContribute',
'contributionSummary' => [],
],
CRM_Contact_BAO_Query::MODE_EVENT => [
'selectorName' => 'CRM_Event_Selector_Search',
......
......@@ -8,7 +8,7 @@
+--------------------------------------------------------------------+
*}
{*Table displays contribution totals for a contact or search result-set *}
{if !empty($annual.count) OR $contributionSummary.total.count OR $contributionSummary.cancel.count OR $contributionSummary.soft_credit.count}
{if !empty($annual.count) OR (!empty($contributionSummary) AND ($contributionSummary.total.count OR $contributionSummary.cancel.count OR $contributionSummary.soft_credit.count))}
<table class="form-layout-compressed">
{if !empty($annual.count)}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment