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
|
### Improvements
|
||||||
- Increase "Success / Failure Keywords" field lengths to 200
|
- Increase "Success / Failure Keywords" field lengths to 200
|
||||||
- Django 3.2.2
|
- Django 3.2.2
|
||||||
|
- Improve the handling of unknown email addresses in the Sign In form
|
||||||
|
|
||||||
## v1.20.0 - 2020-04-22
|
## v1.20.0 - 2020-04-22
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ class EmailLoginForm(forms.Form):
|
|||||||
try:
|
try:
|
||||||
self.user = User.objects.get(email=v)
|
self.user = User.objects.get(email=v)
|
||||||
except User.DoesNotExist:
|
except User.DoesNotExist:
|
||||||
raise forms.ValidationError("Incorrect email address.")
|
raise forms.ValidationError("Unknown email address.")
|
||||||
|
|
||||||
return v
|
return v
|
||||||
|
|
||||||
|
@ -73,21 +73,6 @@
|
|||||||
background: #fff;
|
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 {
|
#login-password {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,17 @@
|
|||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
{% if magic_form.identity.errors %}
|
{% 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 %}
|
{% else %}
|
||||||
<p>Enter your <strong>email address</strong>.</p>
|
<p>Enter your <strong>email address</strong>.</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -97,16 +107,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user