From 5c3451bda73f866c25b8abda9960d8f57a1db9e9 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Fri, 21 Aug 2020 17:52:48 +0200 Subject: [PATCH] Use cards for registration templates --- note_kfet/templates/registration/login.html | 63 +++++++++---------- .../registration/password_reset_form.html | 20 ++++-- note_kfet/templates/registration/signup.html | 46 ++++++++------ 3 files changed, 74 insertions(+), 55 deletions(-) diff --git a/note_kfet/templates/registration/login.html b/note_kfet/templates/registration/login.html index 554a37d8..027c629d 100644 --- a/note_kfet/templates/registration/login.html +++ b/note_kfet/templates/registration/login.html @@ -3,8 +3,6 @@ SPDX-License-Identifier: GPL-2.0-or-later {% endcomment %} {% load i18n crispy_forms_tags static %} - -{# Change page title without displaying it in header #} {% block title %}{% trans "Log in" %}{% endblock %} {% block contenttitle %}{% endblock %} @@ -13,34 +11,35 @@ SPDX-License-Identifier: GPL-2.0-or-later {% endblock %} {% block content %} -
-

- {% trans "Log in" %} -

-
- {% if user.is_authenticated %} -
- {% blocktrans trimmed with username=request.user.username %} - You are authenticated as {{ username }}, but are not authorized to - access this page. Would you like to login to a different account, - or with a higher permission mask? - {% endblocktrans %} -
- {% endif %} - - {% if request.resolver_match.view_name == 'admin:login' %} -
- {% blocktrans trimmed %} - You must be logged with a staff account with the higher mask to access Django Admin. - {% endblocktrans %} -
- {% endif %} - -
{% csrf_token %} - {{ form | crispy }} - - {% trans 'Forgotten your password or username?' %} -
+
+

+ {% trans "Log in" %} +

+
+ {% if user.is_authenticated %} +
+ {% blocktrans trimmed with username=request.user.username %} + You are authenticated as {{ username }}, but are not authorized to + access this page. Would you like to login to a different account, + or with a higher permission mask? + {% endblocktrans %}
-
-{% endblock %} + {% endif %} + + {% if request.resolver_match.view_name == 'admin:login' %} +
+ {% blocktrans trimmed %} + You must be logged with a staff account with the higher mask to access Django Admin. + {% endblocktrans %} +
+ {% endif %} + +
{% csrf_token %} + {{ form | crispy }} + + {% trans 'Forgotten your password or username?' %} +
+ + +{% endblock %} \ No newline at end of file diff --git a/note_kfet/templates/registration/password_reset_form.html b/note_kfet/templates/registration/password_reset_form.html index 61adaa92..e184ae2c 100644 --- a/note_kfet/templates/registration/password_reset_form.html +++ b/note_kfet/templates/registration/password_reset_form.html @@ -3,11 +3,21 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n crispy_forms_tags %} +{% block contenttitle %}{% endblock %} {% 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 }} - -
+
+

+ {% trans "Password reset" %} +

+
+

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

+ +
+ {% csrf_token %} + {{ form | crispy }} + +
+
+
{% endblock %} diff --git a/note_kfet/templates/registration/signup.html b/note_kfet/templates/registration/signup.html index 31134d73..bde985a6 100644 --- a/note_kfet/templates/registration/signup.html +++ b/note_kfet/templates/registration/signup.html @@ -1,23 +1,33 @@ - {% extends 'base.html' %} -{% load crispy_forms_tags %} -{% load i18n %} +{% comment %} +SPDX-License-Identifier: GPL-3.0-or-later +{% endcomment %} +{% load i18n crispy_forms_tags %} {% block title %}{% trans "Sign up" %}{% endblock %} - -{# Use a fixed-width container #} -{% block containertype %}container{% endblock %} +{% block contenttitle %}{% endblock %} {% block content %} -
- {% blocktrans %}If you already signed up, your registration is taken into account. The BDE must validate your account before your can log in. You have to go to the Kfet and pay the registration fee. You must also validate your email address by following the link you received.{% endblocktrans %} -
+
+

+ {% trans "Sign up" %} +

+
+
+ {% blocktrans trimmed %} + If you already signed up, your registration is taken into account. The BDE must validate + your account before your can log in. You have to go to the Kfet and pay the registration fee. You must also + validate your email address by following the link you received. + {% endblocktrans %} +
-
- {% csrf_token %} - {{ form|crispy }} - {{ profile_form|crispy }} - -
-{% endblock %} +
+ {% csrf_token %} + {{ form|crispy }} + {{ profile_form|crispy }} + +
+
+
+{% endblock %} \ No newline at end of file