diff options
author | M Somerville <matthew-github@dracos.co.uk> | 2020-09-25 13:26:23 +0100 |
---|---|---|
committer | M Somerville <matthew-github@dracos.co.uk> | 2020-09-25 13:28:14 +0100 |
commit | a38ecfbe4c5e5741f902eab498a83857500ea8cc (patch) | |
tree | 4f0554228faa2453a2cf569728bd18913fe5f5fa | |
parent | ba1179d0378a35809f4eb2df0ceb3e189c4bd1bc (diff) |
Show username error, in case reporting as another.
If a staff user is reporting as another user, and gives an invalid
email address, for example.
-rw-r--r-- | templates/web/base/report/new/form_user_loggedin.html | 3 | ||||
-rw-r--r-- | templates/web/base/report/update/form_user_loggedin.html | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html index d26948fc2..515f3842a 100644 --- a/templates/web/base/report/new/form_user_loggedin.html +++ b/templates/web/base/report/new/form_user_loggedin.html @@ -37,6 +37,9 @@ [% IF c.user.email_verified %] <label for="form_username">[% loc('Email address') %]<span class="hidden"> [% loc('(optional)') %]</span></label> + [% IF field_errors.username_register %] + <p class='form-error'>[% field_errors.username_register %]</p> + [% END %] <input class="form-control" id="form_username" name="username" [%- IF NOT can_contribute_as_another_user -%] disabled diff --git a/templates/web/base/report/update/form_user_loggedin.html b/templates/web/base/report/update/form_user_loggedin.html index 35c9beeff..8d55737d2 100644 --- a/templates/web/base/report/update/form_user_loggedin.html +++ b/templates/web/base/report/update/form_user_loggedin.html @@ -23,6 +23,9 @@ [% END %] </select> <label for="form_username">[% loc('Email address') %]</label> + [% IF field_errors.username_register %] + <p class='form-error'>[% field_errors.username_register %]</p> + [% END %] <input class="form-control" name="username" id="form_username" type="text" value="[% c.user.email | html %]"> [% END %] |