From ac78d6a919fc33ba6c0f73df6f75d938b139d8db Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Wed, 14 Aug 2019 15:15:38 +0200 Subject: [PATCH] Make registration template look more Bootstrap --- templates/registration/logged_out.html | 6 ----- templates/registration/login.html | 24 ++++++++++++------- .../registration/password_change_done.html | 6 ++--- .../registration/password_change_form.html | 14 ++++++----- .../registration/password_reset_complete.html | 9 +++---- .../registration/password_reset_confirm.html | 16 +++++++++---- .../registration/password_reset_done.html | 7 +++--- .../registration/password_reset_email.html | 13 ---------- .../registration/password_reset_form.html | 12 ++++++---- 9 files changed, 52 insertions(+), 55 deletions(-) delete mode 100644 templates/registration/password_reset_email.html diff --git a/templates/registration/logged_out.html b/templates/registration/logged_out.html index c0c27f47..3b044b7d 100644 --- a/templates/registration/logged_out.html +++ b/templates/registration/logged_out.html @@ -4,12 +4,6 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n %} -{% block breadcrumbs %} - -{% endblock %} - {% block content %}

{% trans "Thanks for spending some quality time with the Web site today." %}

{% trans 'Log in again' %}

diff --git a/templates/registration/login.html b/templates/registration/login.html index 4fa6df5c..04ef8d7d 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -2,16 +2,24 @@ {% comment %} SPDX-License-Identifier: GPL-2.0-or-later {% endcomment %} +{% load i18n crispy_forms_tags %} -{% load i18n %} -{% load crispy_forms_tags %} {% block title %}{% trans "Log in" %}{% endblock %} +{% block contenttitle %}

{% trans "Log in" %}

{% endblock %} {% block content %} -

Login

-
- {% csrf_token %} - {{ form | crispy }} - -
+ {% if user.is_authenticated %} +

+ {% blocktrans trimmed %} + You are authenticated as {{ username }}, but are not authorized to + access this page. Would you like to login to a different account? + {% endblocktrans %} +

+ {% endif %} + +
{% csrf_token %} + {{ form | crispy }} + + {% trans 'Forgotten your password or username?' %} +
{% endblock %} diff --git a/templates/registration/password_change_done.html b/templates/registration/password_change_done.html index 45edfe02..150a00e9 100644 --- a/templates/registration/password_change_done.html +++ b/templates/registration/password_change_done.html @@ -4,8 +4,6 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n %} -{% block breadcrumbs %} - +{% block content %} +

{% trans 'Your password was changed.' %}

{% endblock %} diff --git a/templates/registration/password_change_form.html b/templates/registration/password_change_form.html index 45edfe02..01133e4c 100644 --- a/templates/registration/password_change_form.html +++ b/templates/registration/password_change_form.html @@ -2,10 +2,12 @@ {% comment %} SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} -{% load i18n %} +{% load i18n crispy_forms_tags %} -{% block breadcrumbs %} - -{% endblock %} +{% block content %} +
{% csrf_token %} +

{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}

+ {{ form | crispy }} + +
+{% endblock %} \ No newline at end of file diff --git a/templates/registration/password_reset_complete.html b/templates/registration/password_reset_complete.html index 055244cb..bb91a3c5 100644 --- a/templates/registration/password_reset_complete.html +++ b/templates/registration/password_reset_complete.html @@ -4,8 +4,9 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n %} -{% block breadcrumbs %} - +{% block content %} +

{% trans "Your password has been set. You may go ahead and log in now." %}

+

+ {% trans 'Log in' %} +

{% endblock %} diff --git a/templates/registration/password_reset_confirm.html b/templates/registration/password_reset_confirm.html index edb1ae1e..5db0e810 100644 --- a/templates/registration/password_reset_confirm.html +++ b/templates/registration/password_reset_confirm.html @@ -2,10 +2,16 @@ {% comment %} SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} -{% load i18n %} +{% load i18n crispy_forms_tags %} -{% block breadcrumbs %} - +{% block content %} + {% if validlink %} +

{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}

+
{% csrf_token %} + {{ form | crispy }} + +
+ {% else %} +

{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}

+ {% endif %} {% endblock %} diff --git a/templates/registration/password_reset_done.html b/templates/registration/password_reset_done.html index 055244cb..a215ab93 100644 --- a/templates/registration/password_reset_done.html +++ b/templates/registration/password_reset_done.html @@ -4,8 +4,7 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n %} -{% block breadcrumbs %} - +{% block content %} +

{% trans "We've emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly." %}

+

{% trans "If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder." %}

{% endblock %} diff --git a/templates/registration/password_reset_email.html b/templates/registration/password_reset_email.html deleted file mode 100644 index f43d80c3..00000000 --- a/templates/registration/password_reset_email.html +++ /dev/null @@ -1,13 +0,0 @@ -{% load i18n %}{% autoescape off %} -{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %} - -{% trans "Please go to the following page and choose a new password:" %} -{% block reset_link %} -{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} -{% endblock %} - -{% trans "Thanks for using our site!" %} - -{% blocktrans %}The {{ site_name }} team{% endblocktrans %} - -{% endautoescape %} diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html index 055244cb..61adaa92 100644 --- a/templates/registration/password_reset_form.html +++ b/templates/registration/password_reset_form.html @@ -2,10 +2,12 @@ {% comment %} SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} -{% load i18n %} +{% load i18n crispy_forms_tags %} -{% block breadcrumbs %} - +{% block content %} +

{% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %}

+
{% csrf_token %} + {{ form | crispy }} + +
{% endblock %}