diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d573a23..c5b005f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. ### Improvements - Increase "Success / Failure Keywords" field lengths to 200 - Django 3.2.2 +- Improve the handling of unknown email addresses in the Sign In form ## v1.20.0 - 2020-04-22 diff --git a/hc/accounts/forms.py b/hc/accounts/forms.py index f9838438..4f7bb2b2 100644 --- a/hc/accounts/forms.py +++ b/hc/accounts/forms.py @@ -59,7 +59,7 @@ class EmailLoginForm(forms.Form): try: self.user = User.objects.get(email=v) except User.DoesNotExist: - raise forms.ValidationError("Incorrect email address.") + raise forms.ValidationError("Unknown email address.") return v diff --git a/static/css/login.css b/static/css/login.css index f0dfd152..31629b5f 100644 --- a/static/css/login.css +++ b/static/css/login.css @@ -73,21 +73,6 @@ background: #fff; } -#login-signup-cta { - font-size: 18px; - color: #999; - margin-top: 40px; -} - -#login-signup-cta a { - color: #999; - text-decoration: underline; -} - -#login-signup-cta a:hover { - color: #0091EA; -} - #login-password { margin-bottom: 0; } diff --git a/templates/accounts/login.html b/templates/accounts/login.html index 25887046..de6720dc 100644 --- a/templates/accounts/login.html +++ b/templates/accounts/login.html @@ -27,7 +27,17 @@ {% csrf_token %} {% if magic_form.identity.errors %} -
{{ magic_form.identity.errors|join:"" }}
++ {% for e in magic_form.identity.errors %} + {{ e }} + {% if e == "Unknown email address." and registration_open %} + Create Account? + {% endif %} + {% endfor %} +
{% else %}Enter your email address.
{% endif %} @@ -97,16 +107,6 @@ - - {% if registration_open %} -