From 9490ba5ed4836058c3e0b40cbdf9f5589e50d476 Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Sat, 10 Jun 2017 10:58:05 +0200 Subject: [PATCH] Improve reset_password templates --- .../templates/scipost/change_password.html | 30 +++++++------------ scipost/templates/scipost/reset_password.html | 26 ++++++++-------- .../scipost/reset_password_complete.html | 2 +- .../scipost/reset_password_confirm.html | 18 +++++++---- 4 files changed, 36 insertions(+), 40 deletions(-) diff --git a/scipost/templates/scipost/change_password.html b/scipost/templates/scipost/change_password.html index c0e94de5a..ffac2c404 100644 --- a/scipost/templates/scipost/change_password.html +++ b/scipost/templates/scipost/change_password.html @@ -6,26 +6,16 @@ {% block content %} -{% if ack %} - <div class="row"> - <div class="col-12"> - <h1>Your SciPost password has been successfully changed</h1> - </div> - </div> -{% else %} - <div class="row"> - <div class="col-lg-8 offset-lg-2"> - <h1 class="highlight">Change your SciPost password</h1> - {% if errormessage %} - <p class="text-danger">{{ errormessage }}</p> - {% endif %} - <form action="{% url 'scipost:change_password' %}" method="post"> - {% csrf_token %} - {{form|bootstrap}} - <input type="submit" class="btn btn-secondary" value="Change" /> - </form> - </div> +<div class="row"> + <div class="col-lg-8 offset-lg-2"> + <h1 class="highlight">Change your SciPost password</h1> + + <form action="{% url 'scipost:change_password' %}" method="post"> + {% csrf_token %} + {{form|bootstrap}} + <input type="submit" class="btn btn-secondary" value="Change" /> + </form> </div> -{% endif %} +</div> {% endblock content %} diff --git a/scipost/templates/scipost/reset_password.html b/scipost/templates/scipost/reset_password.html index 429ed46c7..e8169dba2 100644 --- a/scipost/templates/scipost/reset_password.html +++ b/scipost/templates/scipost/reset_password.html @@ -2,20 +2,20 @@ {% block pagetitle %}: Reset Password{% endblock pagetitle %} -{% block bodysup %} - {% load bootstrap %} -<div class="container"> - <div class="row"> - <div class="col-md-4"> - <h3>Reset password request form</h3> - <form method="post"> - {% csrf_token %} - {{ form|bootstrap }} - <input class="btn btn-primary" type="submit" value="Submit" /> - </form> +{% block content %} + + +<div class="row"> + <div class="col-md-4 offset-md-4"> + <h3>Reset password request form</h3> + <form method="post"> + {% csrf_token %} + {{ form|bootstrap }} + <input class="btn btn-primary" type="submit" value="Submit" /> + </form> </div> - </div> </div> -{% endblock bodysup %} + +{% endblock %} diff --git a/scipost/templates/scipost/reset_password_complete.html b/scipost/templates/scipost/reset_password_complete.html index f675ab996..dd226a8df 100644 --- a/scipost/templates/scipost/reset_password_complete.html +++ b/scipost/templates/scipost/reset_password_complete.html @@ -3,5 +3,5 @@ {% block pagetitle %}: Reset password complete{% endblock pagetitle %} {% block bodysup %} -<p>You have successfully reset your password.</p> + <p>You have successfully reset your password.</p> {% endblock bodysup %} diff --git a/scipost/templates/scipost/reset_password_confirm.html b/scipost/templates/scipost/reset_password_confirm.html index e302efffc..60afebc99 100644 --- a/scipost/templates/scipost/reset_password_confirm.html +++ b/scipost/templates/scipost/reset_password_confirm.html @@ -2,16 +2,22 @@ {% block pagetitle %}: Reset password confirm{% endblock pagetitle %} -{% block bodysup %} -<section> +{% load bootstrap %} + +{% block content %} + +<div class="row"> + <div class="col-md-6 offset-md-3"> {% if validlink %} <form method="post"> {% csrf_token %} - {{ form.as_p }} - <button type="submit">Submit</button> + {{ form|bootstrap }} + <input class="btn btn-secondary" type="submit" value="Submit"> </form> {% else %} <p>This reset link is no longer valid!</p> {% endif %} -</section> -{% endblock bodysup %} + </div> +</div> + +{% endblock content %} -- GitLab