mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-25 02:19:12 -04:00
Link to ‘who it’s for’ when error creating account
If someone enters an email address from a domain we don’t recognise we direct them straight to our support channel. This is causing increased contact from suppliers and members of the public. Now that we have a page which explains who can use Notify, let’s direct people there first. Then if they really do need to contact support (because we don’t recognise their organisation) then they can do so from that page.
This commit is contained in:
@@ -43,11 +43,10 @@ class ValidGovEmail:
|
||||
return
|
||||
|
||||
from flask import url_for
|
||||
message = (
|
||||
'Enter a government email address.'
|
||||
' If you think you should have access'
|
||||
' <a class="govuk-link govuk-link--no-visited-state" href="{}">contact us</a>'
|
||||
).format(url_for('main.support'))
|
||||
message = '''
|
||||
Enter a public sector email address or
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{}">find out who can use Notify</a>
|
||||
'''.format(url_for('main.who_its_for'))
|
||||
if not is_gov_user(field.data.lower()):
|
||||
raise ValidationError(message)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user