Skip to content

Commit e074b76

Browse files
committed
Displaying Error On Password Change Forms (Reset+Change)
1 parent cd66ccb commit e074b76

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

website/forum/templates/registration/login.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,14 @@
4848
<!-- LOGIN -->
4949
<button type="submit" class="btn btn-outline-success ml-2"style="float:right;">Login</button>
5050
<a href="{% url 'profile:password_reset'%}" style="position:relative;float:left;bottom:-5px;margin-left:10px;text-decoration: underline;">Forgot password</a>
51-
{% if form.errors %}
52-
<p class="text-warning">Username or Password is Incorrect!</p>
53-
{% endif %}
51+
5452
</form>
5553
<div class="col-sm-10 col-md-5 col-lg-5">
54+
{% if form.errors %}
55+
<div class="alert alert-warning" role="alert">
56+
Username or Password is Incorrect!
57+
</div>
58+
{% endif %}
5659
<hr class="mobileLine">
5760
<span style="position: relative;bottom:10px;">Don't have an account, make one !</span>
5861
<!-- SIGN UP -->

website/user_profile/templates/registration/change_password.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
</table>
2525
<br>
2626
<button type="submit" class="save btn btn-success">Submit</button>
27+
{% if form.errors %}
28+
<div class="alert alert-warning" role="alert">
29+
{% for field in form %}
30+
{% for error in field.errors %}
31+
{{ error }}
32+
{% endfor %}
33+
{% endfor %}
34+
</div>
35+
{% endif %}
2736
</form>
2837
</center>
2938
</div>

website/user_profile/templates/registration/password_reset_form.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@
1414
<input type="hidden" name="ajax_check" value="True">
1515
</table>
1616
<button type="submit" class="save btn btn-success">Submit</button>
17+
{% if form.errors %}
18+
<div class="alert alert-warning" role="alert">
19+
{% for field in form %}
20+
{% for error in field.errors %}
21+
{{ error }}
22+
{% endfor %}
23+
{% endfor %}
24+
</div>
25+
{% endif %}
1726
</form>
1827
</center>
1928
<div id='msg'>

0 commit comments

Comments
 (0)