aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-01-18 18:28:04 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-01-18 19:01:56 +0000
commitbbf46b46378749dd884843b182700daec39649c1 (patch)
tree0b25803988838352723a2a6b6ddd4e57b63e38b5
parent8957d112ca7dab397af1a08fbf392f707b5a4dee (diff)
[Zurich] Add filters to /reports, fix photo bug.
The photo JavaScript needs including in case a report is pulled in.
-rwxr-xr-xtemplates/web/zurich/reports/index.html2
-rw-r--r--web/js/map-OpenLayers.js2
2 files changed, 3 insertions, 1 deletions
diff --git a/templates/web/zurich/reports/index.html b/templates/web/zurich/reports/index.html
index 1389c666c..d6d7a541a 100755
--- a/templates/web/zurich/reports/index.html
+++ b/templates/web/zurich/reports/index.html
@@ -1,4 +1,5 @@
[%
+ PROCESS "report/photo-js.html";
PROCESS "maps/${map.type}.html";
SET bodyclass = 'mappage';
INCLUDE 'header.html',
@@ -13,6 +14,7 @@
<h1>[% loc('All Reports') %]</h1>
<section class="full-width">
+ [% INCLUDE "reports/_list-filters.html", use_form_wrapper = 1 %]
<div class="js-pagination">
[% INCLUDE 'pagination.html', param = 'p' %]
</div>
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 1238bb351..7f8ec1755 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -855,10 +855,10 @@ OpenLayers.Protocol.FixMyStreet = OpenLayers.Class(OpenLayers.Protocol.HTTP, {
$('#loading-indicator').removeClass('hidden');
$('#loading-indicator').attr('aria-hidden', false);
// Pass the values of the category, status, and sort fields as query params
+ options.params = options.params || {};
$.each({ filter_category: 'filter_categories', status: 'statuses', sort: 'sort' }, function(key, id) {
var val = $('#' + id).val();
if (val !== undefined) {
- options.params = options.params || {};
options.params[key] = val;
}
});