forked from GithubBackups/healthchecks
Improve the handling of unknown email addresses in the Sign In form
This commit is contained in:
parent
94416c90dc
commit
e090aa5403
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -27,7 +27,17 @@
|
||||
{% csrf_token %}
|
||||
|
||||
{% if magic_form.identity.errors %}
|
||||
<p class="text-danger">{{ magic_form.identity.errors|join:"" }}</p>
|
||||
<p class="text-danger">
|
||||
{% for e in magic_form.identity.errors %}
|
||||
{{ e }}
|
||||
{% if e == "Unknown email address." and registration_open %}
|
||||
<a
|
||||
href="#"
|
||||
data-toggle="modal"
|
||||
data-target="#signup-modal">Create Account?</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% else %}
|
||||
<p>Enter your <strong>email address</strong>.</p>
|
||||
{% endif %}
|
||||
@ -97,16 +107,6 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if registration_open %}
|
||||
<div class="row">
|
||||
<div id="login-signup-cta" class="col-sm-12 text-center">
|
||||
Don't have an account?
|
||||
<a href="#" data-toggle="modal" data-target="#signup-modal">Sign Up</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user