aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-03-09 14:23:51 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-03-09 14:23:51 +0000
commit1115f106e0421c10a81c3ce8d187ef6cd3e639fc (patch)
treeabbd4504bc796e26dfe9d1634264df94a7bfa435
parent8c5f462c2215446df04503e4da4cd40e0b01ec59 (diff)
Specify options in 'all' status filter.
A cobrand may have a blank default that isn't everything, so the "All reports" option must specify all the possible options.
-rw-r--r--templates/web/base/reports/_list-filters.html3
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js5
2 files changed, 5 insertions, 3 deletions
diff --git a/templates/web/base/reports/_list-filters.html b/templates/web/base/reports/_list-filters.html
index 58be5cd50..61a44629d 100644
--- a/templates/web/base/reports/_list-filters.html
+++ b/templates/web/base/reports/_list-filters.html
@@ -1,5 +1,6 @@
[% select_status = BLOCK %]
- <select class="form-control js-multiple" name="status" id="statuses" multiple data-all="[% loc('All reports') %]">
+ <select class="form-control js-multiple" name="status" id="statuses" multiple
+ data-all="[% loc('All reports') %]" data-all-options='["open","closed","fixed"]'>
[% IF c.user_exists AND c.user.has_body_permission_to('planned_reports') AND !shortlist %]
<option value="shortlisted"[% ' selected' IF filter_status.shortlisted %]>[% loc('Shortlisted') %]</option>
<option value="unshortlisted"[% ' selected' IF filter_status.unshortlisted %]>[% loc('Unshortlisted') %]</option>
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 8e8941421..6480f47f5 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -722,14 +722,15 @@ $.extend(fixmystreet.set_up, {
function make_multi(id) {
var $id = $('#' + id),
- all = $id.data('all');
+ all = $id.data('all'),
+ allOpts = $id.data('allOptions') || [];
$id.multiSelect({
allText: all,
noneText: all,
positionMenuWithin: $('#side'),
presets: [{
name: all,
- options: []
+ options: allOpts
}]
});
}