diff options
author | Struan Donald <struan@exo.org.uk> | 2018-11-01 10:50:38 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2018-11-19 13:29:49 +0000 |
commit | b4618c61ff5ddf6db9662b06bc55a0f74b43c903 (patch) | |
tree | 17e4c2a7651a60b14bd37a2bc2d19f670ddc4153 /templates | |
parent | b35552138fd66673df46747549989d545bbcfa9f (diff) |
add default_to_body permission
If a user has this permission then the report_as dropdown will
default to reporting as the body.
For mysociety/freshdesk#23
Diffstat (limited to 'templates')
-rw-r--r-- | templates/web/base/report/new/form_user_loggedin.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html index 41cbc4a54..8c53b4365 100644 --- a/templates/web/base/report/new/form_user_loggedin.html +++ b/templates/web/base/report/new/form_user_loggedin.html @@ -16,7 +16,7 @@ [% BLOCK form_as %] <label for="form_as">[% loc('Report as') %]</label> <select id="form_as" class="form-control js-contribute-as" name="form_as"> - <option value="myself" [% c.user.has_body_permission_to('planned_reports') ? '' : 'selected' %]>[% loc('Yourself') %]</option> + <option value="myself" [% ( c.user.has_body_permission_to('planned_reports') || c.user.has_body_permission_to('default_to_body') ) ? '' : 'selected' %]>[% loc('Yourself') %]</option> [% IF js || can_contribute_as_anonymous_user %] <option value="anonymous_user">[% loc('Anonymous user') %]</option> [% END %] @@ -24,7 +24,7 @@ <option value="another_user">[% loc('Another user') %]</option> [% END %] [% IF js || can_contribute_as_body %] - <option value="body" [% c.user.has_body_permission_to('planned_reports') ? 'selected' : '' %]>[% c.user.from_body.name %]</option> + <option value="body" [% ( c.user.has_body_permission_to('planned_reports') || c.user.has_body_permission_to('default_to_body') ) ? 'selected' : '' %]>[% c.user.from_body.name %]</option> [% END %] </select> [% END %] |