diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-09-12 15:52:15 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-09-13 10:54:43 +0100 |
commit | e466e4db9be320953fbda98e3fbb291c8fe067dc (patch) | |
tree | 0eb66b7fe4cfcba7d6fc9dc51a50d064c4a250c7 | |
parent | a181c520986498ab5a898ad3c21c04affa215378 (diff) |
Disable email field for logged in people using JS.
They're logged in, it's only showing them as a confirmatory check,
so it should not be editable.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | templates/web/base/report/new/form_user_loggedin.html | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 86fd35983..3f0a8a15e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ - Improve performance of various pages. #1799 - Duplicate list not loading when phone number present. #1803 - Don't list multiple fixed states all as Fixed in dropdown. #1824 + - Disable email field for logged in people. #1840 - Development improvements: - Debug toolbar added. #1823 - `switch-site` script to automate switching config.yml files. #1741 diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html index 8e6629273..e841845bf 100644 --- a/templates/web/base/report/new/form_user_loggedin.html +++ b/templates/web/base/report/new/form_user_loggedin.html @@ -30,10 +30,8 @@ [% END %] <label for="form_email">[% loc('Email address') %]</label> - <input class="form-control" id="form_email" - [%- IF js OR can_contribute_as_another_user OR can_contribute_as_body -%] - name="email" - [%- ELSE -%] + <input class="form-control" id="form_email" name="email" + [%- IF NOT can_contribute_as_another_user -%] disabled [%- END -%] type="text" value="[% c.user.email | html %]"> |