aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/base')
-rw-r--r--templates/web/base/admin/user-form.html10
-rw-r--r--templates/web/base/dashboard/index.html10
2 files changed, 11 insertions, 9 deletions
diff --git a/templates/web/base/admin/user-form.html b/templates/web/base/admin/user-form.html
index bb8511726..735e15e87 100644
--- a/templates/web/base/admin/user-form.html
+++ b/templates/web/base/admin/user-form.html
@@ -79,11 +79,13 @@
%]
</p>
</div>
- <label for="area_id">[% loc('Area:') %]</label>
- <select class="form-control" id='area_id' name='area_id' [% 'disabled' UNLESS c.user.has_permission_to('user_assign_areas', user.from_body.id) %]>
- <option value=''>[% loc('No area') %]</option>
+ <label for="area_ids">[% loc('Area:') %]</label>
+ <select class="form-control js-multiple" id="area_ids" name="area_ids"
+ multiple data-none="-- [% loc('Select an area') %] --"
+ [% 'disabled' UNLESS c.user.has_permission_to('user_assign_areas', user.from_body.id) %]>
[% FOREACH area IN areas %]
- <option value="[% area.id %]"[% ' selected' IF area.id == user.area_id %]>[% area.name | html %]</option>
+ [% SET aid = area.id %]
+ <option value="[% aid %]"[% ' selected' IF user.in_area(aid) %]>[% area.name | html %]</option>
[% END %]
</select>
</li>
diff --git a/templates/web/base/dashboard/index.html b/templates/web/base/dashboard/index.html
index 7c3966b04..c90823d37 100644
--- a/templates/web/base/dashboard/index.html
+++ b/templates/web/base/dashboard/index.html
@@ -24,12 +24,12 @@
<div class="filters">
[% IF body %]
<input type="hidden" name="body" value="[% body.id | html %]">
- [% IF NOT c.user.area_id %]
+ [% IF NOT c.user.area_ids.size %]
<p>
<label for="ward">[% loc('Ward:') %]</label>
- <select class="form-control" name="ward" id="ward"><option value=''>[% loc('All') %]</option>
+ <select class="form-control js-multiple" multiple name="ward" id="ward">
[% FOR w IN children.values.sort('name') %]
- <option value="[% w.id %]"[% ' selected' IF w.id == ward %]>[% w.name %]</option>
+ <option value="[% w.id %]"[% ' selected' IF ward.grep(w.id).size %]>[% w.name %]</option>
[% END %]
</select>
</p>
@@ -47,7 +47,7 @@
[% ELSE %]
<p>
- <label for="ward">[% loc('Council:') %]</label>
+ <label for="body">[% loc('Council:') %]</label>
<select class="form-control" name="body" id="body"><option value=''>[% loc('All') %]</option>
[% FOR b IN bodies %]
[% NEXT IF NOT b.area_count %]
@@ -59,7 +59,7 @@
[% END %]
<p>
- <label for="state">[% loc('Report state:') %]</label>
+ <label for="state">[% loc('Report state:') | replace(' ', '&nbsp;') %]</label>
<select class="form-control" name="state" id="state">
<option value=''>[% loc('All') %]</option>
[% FOR group IN filter_states %]