summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalaparthy Adityachandra2020-02-28 15:48:54 +0530
committerGitHub2020-02-28 15:48:54 +0530
commit846afd3469923282a75197267a5138209e807619 (patch)
tree872ec1651df4c922bb208fb9c67a41cc5725426c
parentce0cdc307312d4da803abb3377cf7562b3fbcb4b (diff)
parent78368a851231507557c4d524707da7ff5197509c (diff)
downloadonline_test-846afd3469923282a75197267a5138209e807619.tar.gz
online_test-846afd3469923282a75197267a5138209e807619.tar.bz2
online_test-846afd3469923282a75197267a5138209e807619.zip
Merge pull request #653 from adityacp/fix_forgot_password_form
Fix UI in forgot and change password
-rw-r--r--yaksh/templates/registration/password_change_form.html34
-rw-r--r--yaksh/templates/registration/password_reset_confirm.html44
2 files changed, 59 insertions, 19 deletions
diff --git a/yaksh/templates/registration/password_change_form.html b/yaksh/templates/registration/password_change_form.html
index 8d8424e..37f6e93 100644
--- a/yaksh/templates/registration/password_change_form.html
+++ b/yaksh/templates/registration/password_change_form.html
@@ -58,8 +58,17 @@ Change Password
<div class="container col-md-6">
<table class="table table-responsive-sm">
{% if form.errors %}
- {% for field in form %}
- {% for error in field.errors %}
+ {% for field in form %}
+ {% for error in field.errors %}
+ <div class="alert alert-dismissible alert-danger">
+ <button type="button" class="close" data-dismiss="alert">
+ <i class="fa fa-close"></i>
+ </button>
+ <strong>{{ error|escape }}</strong>
+ </div>
+ {% endfor %}
+ {% endfor %}
+ {% for error in form.non_field_errors %}
<div class="alert alert-dismissible alert-danger">
<button type="button" class="close" data-dismiss="alert">
<i class="fa fa-close"></i>
@@ -67,22 +76,13 @@ Change Password
<strong>{{ error|escape }}</strong>
</div>
{% endfor %}
+ {% endif %}
+ {% for field in form %}
+ <tr>
+ <td>{{ field.label }}</td>
+ <td>{{ field }} <small>{{ field.help_text }}</small></td>
+ </tr>
{% endfor %}
- {% for error in qform.non_field_errors %}
- <div class="alert alert-dismissible alert-danger">
- <button type="button" class="close" data-dismiss="alert">
- <i class="fa fa-close"></i>
- </button>
- <strong>{{ error|escape }}</strong>
- </div>
- {% endfor %}
- {% endif %}
- {% for field in form %}
- <tr>
- <td>{{ field.label }}</td>
- <td>{{ field }} <small>{{ field.help_text }}</small></td>
- </tr>
- {% endfor %}
</table>
</div>
</center>
diff --git a/yaksh/templates/registration/password_reset_confirm.html b/yaksh/templates/registration/password_reset_confirm.html
index ef2d1f2..02f1228 100644
--- a/yaksh/templates/registration/password_reset_confirm.html
+++ b/yaksh/templates/registration/password_reset_confirm.html
@@ -11,18 +11,58 @@
</nav>
{% endblock %}
+{% block script %}
+<script type="text/javascript">
+ $(document).ready(function()
+ {
+ $("#id_new_password1").addClass("form-control");
+ $("#id_new_password2").addClass("form-control");
+ });
+</script>
+{% endblock %}
+
{% block content %}
<br><br>
<center><h4>Reset Password</h4>
+ <div class="container col-md-6">
{% if validlink %}
- <p>Please enter your new password twice so we can verify you typed it in correctly</p>.
+ <p>Please enter your new password twice so we can verify you typed it in correctly
+ </p>.
<form method="post">
{% csrf_token %}
- {{ form.as_p }}
+ <table class="table table-responsive-sm">
+ {% if form.errors %}
+ {% for field in form %}
+ {% for error in field.errors %}
+ <div class="alert alert-dismissible alert-danger">
+ <button type="button" class="close" data-dismiss="alert">
+ <i class="fa fa-close"></i>
+ </button>
+ <strong>{{ error|escape }}</strong>
+ </div>
+ {% endfor %}
+ {% endfor %}
+ {% for error in form.non_field_errors %}
+ <div class="alert alert-dismissible alert-danger">
+ <button type="button" class="close" data-dismiss="alert">
+ <i class="fa fa-close"></i>
+ </button>
+ <strong>{{ error|escape }}</strong>
+ </div>
+ {% endfor %}
+ {% endif %}
+ {% for field in form %}
+ <tr>
+ <td>{{ field.label }}</td>
+ <td>{{ field }} <small>{{ field.help_text }}</small></td>
+ </tr>
+ {% endfor %}
+ </table>
<button class= "btn btn-success btn-lg" type="submit">Submit</button>
</form>
{% else %}
<p>This reset link is no longer valid!</p>
{% endif %}
+ </div>
</center>
{% endblock %}