From 0ef5a166d6cb6bf2a4dd4674628df012c0542b8b Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Fri, 15 Nov 2019 07:53:55 -0500
Subject: [PATCH] Fixes double-checkbox-filter display introduced by #1482.
 (#1500)

---
 themes/bootstrap3/templates/RecordTab/collectionlist.phtml | 4 ++--
 themes/bootstrap3/templates/combined/results.phtml         | 2 +-
 themes/bootstrap3/templates/search/results.phtml           | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/themes/bootstrap3/templates/RecordTab/collectionlist.phtml b/themes/bootstrap3/templates/RecordTab/collectionlist.phtml
index 22460757bdd..69ffa2b2fba 100644
--- a/themes/bootstrap3/templates/RecordTab/collectionlist.phtml
+++ b/themes/bootstrap3/templates/RecordTab/collectionlist.phtml
@@ -7,7 +7,7 @@
   $params = $this->tab->getParams();
   $searchDetails = ['results' => $results, 'params' => $params, 'indexStart' => 1];
 
-  $filterList = $params->getFilterList(false);
+  $filterList = $params->getFilterList(true);
   $checkboxFilters = $params->getCheckboxFacets();
 ?>
 <div class="<?=$this->layoutClass('mainbody')?>">
@@ -22,7 +22,7 @@
       <form class="form-inline" role="form" method="get" name="keywordFilterForm" id="keywordFilterForm">
         <div class="input-group">
           <input id="keywordFilter_lookfor" type="text" name="lookfor" placeholder="<?=$this->transEsc('Search within collection')?>" value="<?=$params->getDisplayQuery()?>" class="form-control">
-          <?php foreach ($params->getFilterList(true) as $field => $filters): ?>
+          <?php foreach ($filterList as $field => $filters): ?>
             <?php foreach ($filters as $filter): ?>
               <input type="hidden" name="filter[]" value="<?=$this->escapeHtmlAttr($filter['field'])?>:&quot;<?=$this->escapeHtmlAttr($filter['value'])?>&quot;" />
             <?php endforeach; ?>
diff --git a/themes/bootstrap3/templates/combined/results.phtml b/themes/bootstrap3/templates/combined/results.phtml
index 01c5a707b00..9bdc276a54f 100644
--- a/themes/bootstrap3/templates/combined/results.phtml
+++ b/themes/bootstrap3/templates/combined/results.phtml
@@ -17,7 +17,7 @@
       'searchId' => $this->results->getSearchId(),
       'searchClassId' => $this->params->getSearchClassId(),
       'checkboxFilters' => $this->params->getCheckboxFacets(),
-      'filterList' => $this->params->getFilterList(),
+      'filterList' => $this->params->getFilterList(true),
       'hasDefaultsApplied' => $this->params->hasDefaultsApplied(),
       'selectedShards' => $this->params->getSelectedShards()
     ]
diff --git a/themes/bootstrap3/templates/search/results.phtml b/themes/bootstrap3/templates/search/results.phtml
index 76b09cb00e7..bec5c3c6dbe 100644
--- a/themes/bootstrap3/templates/search/results.phtml
+++ b/themes/bootstrap3/templates/search/results.phtml
@@ -17,7 +17,7 @@
         'searchId' => $this->results->getSearchId(),
         'searchClassId' => $this->params->getSearchClassId(),
         'checkboxFilters' => $this->params->getCheckboxFacets(),
-        'filterList' => $this->params->getFilterList(),
+        'filterList' => $this->params->getFilterList(true),
         'hasDefaultsApplied' => $this->params->hasDefaultsApplied(),
         'selectedShards' => $this->params->getSelectedShards(),
         'ignoreHiddenFiltersInRequest' => isset($this->ignoreHiddenFiltersInRequest) ? $this->ignoreHiddenFiltersInRequest : false,
-- 
GitLab