aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-10-10 16:38:33 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-10-11 10:46:02 +0100
commit8b557e11a27e00959af66ae20ee8d75d8d9de6be (patch)
treed1bb5af60a0a325498f1a3384f04d3573c21bd06 /templates
parent266cf994a94689126f98a1987099cab079cb2180 (diff)
Allow superusers access to update staff dropdowns.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/report/update/form_update.html4
-rw-r--r--templates/web/bromley/report/update/form_update.html5
2 files changed, 4 insertions, 5 deletions
diff --git a/templates/web/base/report/update/form_update.html b/templates/web/base/report/update/form_update.html
index ed5b83355..fb79232a2 100644
--- a/templates/web/base/report/update/form_update.html
+++ b/templates/web/base/report/update/form_update.html
@@ -27,7 +27,7 @@
[% END %]
<label for="form_update">[% loc( 'Update' ) %]</label>
-[% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %]
+[% IF c.user AND (c.user.is_superuser OR c.user.belongs_to_body(problem.bodies_str)) %]
[% INCLUDE 'admin/response_templates_select.html' for='form_update' %]
[% END %]
[% IF field_errors.update %]
@@ -35,7 +35,7 @@
[% END %]
<textarea rows="7" cols="30" name="update" class="form-control" id="form_update" required>[% update.text | html %]</textarea>
-[% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %]
+[% IF c.user AND (c.user.is_superuser OR c.user.belongs_to_body(problem.bodies_str)) %]
<label for="state">[% loc( 'State' ) %]</label>
[% INCLUDE 'report/inspect/state_groups_select.html' %]
[% ELSE %]
diff --git a/templates/web/bromley/report/update/form_update.html b/templates/web/bromley/report/update/form_update.html
index 190993a0f..01e069dfc 100644
--- a/templates/web/bromley/report/update/form_update.html
+++ b/templates/web/bromley/report/update/form_update.html
@@ -37,7 +37,7 @@
</div>
<label for="form_update">[% loc( 'Update' ) %]</label>
-[% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %]
+[% IF c.user AND (c.user.is_superuser OR c.user.belongs_to_body(problem.bodies_str)) %]
[% INCLUDE 'admin/response_templates_select.html' for='form_update' %]
[% END %]
[% IF field_errors.update %]
@@ -45,10 +45,9 @@
[% END %]
<textarea rows="7" cols="30" name="update" class="form-control" id="form_update" required>[% update.text | html %]</textarea>
-[% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %]
+[% IF c.user AND (c.user.is_superuser OR c.user.belongs_to_body(problem.bodies_str)) %]
<label for="state">[% loc( 'State' ) %]</label>
[% INCLUDE 'report/inspect/state_groups_select.html' %]
[% ELSE %]
[% INCLUDE report/update/form_state_checkbox.html %]
[% END %]
-