From 749c3d608d4155c2ac30a62033d9375a33bb622a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 6 Nov 2015 21:32:27 +0100 Subject: [PATCH] authentic: review and update authentic templates It will need another pass to remove templates where publik-base-theme is enough. --- templates/authentic2/login.html | 27 +-------- templates/authentic2/logout.html | 14 +++-- templates/idp/account_management.html | 2 +- templates/idp/homepage.html | 59 ------------------- templates/idp/logout.html | 42 ------------- templates/profiles/edit_profile.html | 9 +-- templates/profiles/email_change.html | 21 +++---- .../registration/activation_complete.html | 16 ++--- templates/registration/delete_account.html | 24 +++----- .../registration/password_change_form.html | 21 +++---- .../registration/password_reset_complete.html | 14 +---- .../registration/password_reset_confirm.html | 36 ++++------- .../registration/password_reset_done.html | 15 +---- .../registration/password_reset_form.html | 22 +++---- .../registration/registration_complete.html | 15 ++--- templates/registration/registration_form.html | 14 +---- 16 files changed, 75 insertions(+), 276 deletions(-) delete mode 100644 templates/idp/homepage.html delete mode 100644 templates/idp/logout.html diff --git a/templates/authentic2/login.html b/templates/authentic2/login.html index b1d8827..36ae3b6 100644 --- a/templates/authentic2/login.html +++ b/templates/authentic2/login.html @@ -2,37 +2,14 @@ {% load i18n %} {% load staticfiles %} -{% block bodyargs %} -class="narrow-page" -{% endblock %} - -{% block messages %} -{% endblock %} - -{% block title %}Compte citoyen{% endblock %} - -{% block content_header %} -
Compte citoyen
-{% endblock %} - -{% block menu %} -{% endblock %} +{% block extra-body-class %}narrow-page{% endblock %} {% block content %} +

Compte citoyen

Compte citoyen de Montpellier Méditerranée Métropole et de ses communes

-{% if messages %} - -{% endif %} -
{% for name, content in methods %} {{ content|safe }} diff --git a/templates/authentic2/logout.html b/templates/authentic2/logout.html index 2cd4909..2baaf6f 100644 --- a/templates/authentic2/logout.html +++ b/templates/authentic2/logout.html @@ -1,11 +1,8 @@ {% extends "authentic2/base-page.html" %} {% load i18n %} -{% block bodyargs %}class="narrow-page" onload="window.iframe_count -= 1"{% endblock %} - -{% block content_header %} -
Compte citoyen
-{% endblock %} +{% block extra-body-class %}narrow-page{% endblock %} +{% block bodyargs %}onload="window.iframe_count -= 1"{% endblock %} {% comment %}Initialize iframe countdown {% endcomment %} {% block extra_scripts %} @@ -15,7 +12,11 @@ {% endblock %} {% block content %} -

{% trans message %}

+

Compte citoyen

+
+ +

{% trans message %}

+
{% endblock %} diff --git a/templates/idp/account_management.html b/templates/idp/account_management.html index 115dc0a..ce75f41 100644 --- a/templates/idp/account_management.html +++ b/templates/idp/account_management.html @@ -1,4 +1,4 @@ -{% extends "authentic2/base-page.html" %} +{% extends "authentic2/base.html" %} {% load i18n staticfiles %} {% block extra_styles %} diff --git a/templates/idp/homepage.html b/templates/idp/homepage.html deleted file mode 100644 index d173b2f..0000000 --- a/templates/idp/homepage.html +++ /dev/null @@ -1,59 +0,0 @@ -{% extends "authentic2/base-page.html" %} -{% load i18n %} - -{% block title %} -{% trans "Services" %} -{% endblock %} - -{% block bodyargs %} -class="narrow-page" -{% endblock %} - -{% block content_header %} -
{% trans "Services" %}
-{% endblock %} - - -{% block content %} -{% if account_management %} -

- {% trans "Account Management" %} -

-{% endif %} - -{% if authorized_services %} -
-

{% trans "Services" %}

-
    - {% for service in authorized_services %} - {% if service.actions %} -
  • {% if service.url %}{% endif %}{{ service.name }}{% if service.url %}{% endif %} -
    - {% for action in service.actions %} - {% if action.0 == "template" %} - {% include action.1 %} - {% else %} -
    - {% if action.3 %} - {% for key, value in action.3 %} - - {% endfor %} - {% endif %} - - -
    - {% endif %} - {% endfor %} -
    -
  • - {% endif %} - {% endfor %} -
-
-{% endif %} - -{% if user.is_staff %} - -{% endif %} - -{% endblock %} diff --git a/templates/idp/logout.html b/templates/idp/logout.html deleted file mode 100644 index 76909bd..0000000 --- a/templates/idp/logout.html +++ /dev/null @@ -1,42 +0,0 @@ -{% extends "authentic2/base-page.html" %} -{% load i18n %} - -{% block title %}{% trans "Logging out" %}{% endblock %} - -{% block bodyargs %}class="narrow-page" onload="window.iframe_count -= 1"{% endblock %} - -{% comment %}Initialize iframe coutndown {% endcomment %} -{% block extra_scripts %} - -{% endblock %} - -{% block content_header %} -
{% trans "Logging out" %}
-{% endblock %} - -{% block content %} -

{% trans message %}

-
    - {% for fragment in logout_list %} - {{ fragment|safe }} - {% endfor %} -
- - - - - -{% endblock %} diff --git a/templates/profiles/edit_profile.html b/templates/profiles/edit_profile.html index c2a6128..67f2bdc 100644 --- a/templates/profiles/edit_profile.html +++ b/templates/profiles/edit_profile.html @@ -1,14 +1,10 @@ {% extends "authentic2/base-page.html" %} {% load i18n %} -{% block bodyargs %} -class="narrow-page" -{% endblock %} - -{% block title %}{% trans "Edit profile" %}{% endblock %} -{% block content_header %}
{% trans "Account Management" %}
{% endblock %} +{% block extra-body-class %}narrow-page{% endblock %} {% block content %} +

{% trans "Account Management" %}

{% trans "Edit profile" %}

@@ -27,4 +23,3 @@ class="narrow-page"

{% endblock %} - diff --git a/templates/profiles/email_change.html b/templates/profiles/email_change.html index 30e3b58..bbc393d 100644 --- a/templates/profiles/email_change.html +++ b/templates/profiles/email_change.html @@ -1,26 +1,22 @@ {% extends "authentic2/base-page.html" %} {% load i18n %} -{% block bodyargs %} -class="narrow-page" -{% endblock %} +{% block extra-body-class %}narrow-page{% endblock %} -{% block title %}{% trans "Email change" %}{% endblock %} - -{% block content_header %}
{% trans "Account Management" %}
{% endblock %} {% block content %} +

{% trans "Account Management" %}

{% trans "Email change" %}

+ + +
+
+

Le changement de votre adresse de courriel nécessite une validation par courriel. Un lien va vous être envoyé par courriel. Vous devez cliquer sur ce lien pour valider le changement d'adresse de courriel.

-
- - -
- {% csrf_token %} {% include "authentic2/form_fields.html" with form=form %} @@ -28,7 +24,6 @@ lien pour valider le changement d'adresse de courriel.
- -
+
{% endblock %} diff --git a/templates/registration/activation_complete.html b/templates/registration/activation_complete.html index 7861148..2de7490 100644 --- a/templates/registration/activation_complete.html +++ b/templates/registration/activation_complete.html @@ -1,19 +1,13 @@ {% extends "authentic2/base-page.html" %} {% load i18n %} -{% block title %}Compte citoyen{% endblock %} - -{% block bodyargs %}class="narrow-page"{% endblock %} - -{% block content_header %} -
Compte citoyen
-{% endblock %} - -{% block menu %} -{% endblock %} +{% block extra-body-class %}narrow-page{% endblock %} {% block content %} -

{% trans "Your account is now activated" %}

+

Compte citoyen

+
+

{% trans "Your account is now activated" %}

+
{% endblock %} diff --git a/templates/registration/delete_account.html b/templates/registration/delete_account.html index c1c1bfc..fa3cc4b 100644 --- a/templates/registration/delete_account.html +++ b/templates/registration/delete_account.html @@ -1,36 +1,28 @@ {% extends "authentic2/base-page.html" %} {% load i18n %} -{% block bodyargs %} -class="narrow-page" -{% endblock %} - -{% block title %}{% trans "Delete profile" %}{% endblock %} - -{% block content_header %} -
{% trans "Account Management" %}
-{% endblock %} +{% block extra-body-class %}narrow-page{% endblock %} {% block content %} +

{% trans "Account Management" %}

{% trans "Delete profile" %}

-

- Si vous cliquez sur le bouton "confirmer" toutes vos données concernant les - eservices seront effacées et vous ne pourrez plus les récupérer. -

-
-
{% csrf_token %} +

+ Si vous cliquez sur le bouton "confirmer" toutes vos données concernant les + eservices seront effacées et vous ne pourrez plus les récupérer. +

+
- +
{% endblock %} diff --git a/templates/registration/password_change_form.html b/templates/registration/password_change_form.html index 270e13a..be9e53d 100644 --- a/templates/registration/password_change_form.html +++ b/templates/registration/password_change_form.html @@ -1,29 +1,25 @@ {% extends "authentic2/base-page.html" %} {% load i18n %} -{% block bodyargs %} -class="narrow-page" -{% endblock %} - -{% block content_header %} -
{% trans "Account Management" %}
-{% endblock %} +{% block extra-body-class %}narrow-page{% endblock %} {% block content %} +

{% trans "Account Management" %}

{% trans "Change password" %}

+
+ + +
+
+

Pour modifier votre mot de passe vous devez saisir votre mot de passe actuel puis votre nouveau mot de passe à deux reprises. Attention de saisir votre nouveau mot de passe à l'identique dans les deux zones texte prévues à cet effet.

-
- - -
- {% csrf_token %} {% include "authentic2/form_fields.html" with form=form %} @@ -31,7 +27,6 @@ effet.
-
{% endblock %} diff --git a/templates/registration/password_reset_complete.html b/templates/registration/password_reset_complete.html index f932481..3fe9be7 100644 --- a/templates/registration/password_reset_complete.html +++ b/templates/registration/password_reset_complete.html @@ -1,19 +1,11 @@ {% extends "authentic2/base-page.html" %} {% load i18n %} -{% block bodyargs %}class="narrow-page"{% endblock %} - -{% block title %}Compte citoyen{% endblock %} - -{% block content_header %} -
Compte citoyen
-{% endblock %} - -{% block menu %} -{% endblock %} +{% block extra-body-class %}narrow-page{% endblock %} {% block content %} - +

Compte citoyen

+

{% trans "Password reset successfully" %}

diff --git a/templates/registration/password_reset_confirm.html b/templates/registration/password_reset_confirm.html index c5cf853..12a398d 100644 --- a/templates/registration/password_reset_confirm.html +++ b/templates/registration/password_reset_confirm.html @@ -1,35 +1,26 @@ {% extends "authentic2/base-page.html" %} {% load i18n %} -{% block bodyargs %} -class="narrow-page" -{% endblock %} - -{% block title %}Compte citoyen{% endblock %} - -{% block content_header %} -

Compte citoyen
-{% endblock %} - -{% block menu %} -{% endblock %} +{% block extra-body-class %}narrow-page{% endblock %} {% block content %} +

Compte citoyen

+ +
{% if validlink %} -

{% trans "Resetting password" %}

-

-Veuillez saisir votre nouveau mot de passe et le confirmer en le saisissant une -nouvelle fois à l'identique. -

-
-
+ +

+Veuillez saisir votre nouveau mot de passe et le confirmer en le saisissant une +nouvelle fois à l'identique. +

+ {% csrf_token %} {% include "authentic2/form_fields.html" with form=form %} @@ -37,14 +28,13 @@ nouvelle fois à l'identique.
-
- -
- {% else %}

{% trans "Password reset failed" %}

{% endif %} +
+
+ {% endblock %} diff --git a/templates/registration/password_reset_done.html b/templates/registration/password_reset_done.html index c93431d..6cbce2b 100644 --- a/templates/registration/password_reset_done.html +++ b/templates/registration/password_reset_done.html @@ -1,24 +1,15 @@ {% extends "authentic2/base-page.html" %} {% load i18n %} -{% block bodyargs %}class="narrow-page"{% endblock %} - -{% block title %}Compte citoyen{% endblock %} - -{% block content_header %} -
Compte citoyen
-{% endblock %} - -{% block menu %} -{% endblock %} +{% block extra-body-class %}narrow-page{% endblock %} {% block content %} - +

Compte citoyen

{% trans "Resetting password" %}

-

{% trans "Email with password reset instructions has been sent." %}

+
{% endblock %} diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html index 4b69f37..b62463f 100644 --- a/templates/registration/password_reset_form.html +++ b/templates/registration/password_reset_form.html @@ -1,31 +1,21 @@ {% extends "authentic2/base-page.html" %} {% load i18n %} -{% block bodyargs %}class="narrow-page"{% endblock %} - -{% block title %}Compte citoyen{% endblock %} - -{% block content_header %} -
Compte citoyen
-{% endblock %} - -{% block menu %} -{% endblock %} +{% block extra-body-class %}narrow-page{% endblock %} {% block content %} +

Compte citoyen

{% trans "Resetting password" %}

+ +
+

Si vous avez égaré votre mot de passe et que vous souhaitez pouvoir vous connecter à nouveau indiquez votre adresse électronique. Vous recevrez un courriel vous permettant de définir un nouveau mot de passe.

- -
- -
- {% csrf_token %} {% include "authentic2/form_fields.html" with form=form %} @@ -34,6 +24,8 @@ courriel vous permettant de définir un nouveau mot de passe.
+
+
{% endblock %} diff --git a/templates/registration/registration_complete.html b/templates/registration/registration_complete.html index b78984c..69d22bb 100644 --- a/templates/registration/registration_complete.html +++ b/templates/registration/registration_complete.html @@ -1,19 +1,14 @@ {% extends "authentic2/base-page.html" %} {% load i18n %} -{% block bodyargs %}class="narrow-page"{% endblock %} - -{% block title %}Compte citoyen{% endblock %} - -{% block content_header %} -
Compte citoyen
-{% endblock %} - -{% block menu %} -{% endblock %} +{% block extra-body-class %}narrow-page{% endblock %} {% block content %} +

Compte citoyen

+

{% trans "Successful registration" %}

{% trans "Thank you for registering. Activation email sent." %}

+
+
{% endblock %} diff --git a/templates/registration/registration_form.html b/templates/registration/registration_form.html index fc7ef39..40ad185 100644 --- a/templates/registration/registration_form.html +++ b/templates/registration/registration_form.html @@ -1,20 +1,10 @@ {% extends "authentic2/base-page.html" %} {% load i18n %} -{% block bodyargs %} -class="narrow-page" -{% endblock %} - -{% block title %}{% trans "Registration" %} — Compte citoyen{% endblock %} - -{% block content_header %} -
{% trans "Registration" %} — Compte citoyen
-{% endblock %} - -{% block menu %} -{% endblock %} +{% block extra-body-class %}narrow-page{% endblock %} {% block content %} +

{% trans "Registration" %} — Compte citoyen

Création de votre « compte citoyen » Montpellier Méditerranée Métropole.