From 9e439e262ace4abf2dd695a54b4d8c7ba42f9382 Mon Sep 17 00:00:00 2001 From: Serghei Mihai Date: Fri, 17 May 2019 16:42:46 +0200 Subject: [PATCH] templates: restyle authorization page --- static/grandlyon-cut/_custom.scss | 79 ++++++++++++++++--- .../authentic2_idp_oidc/authorization.html | 37 ++++++--- 2 files changed, 92 insertions(+), 24 deletions(-) diff --git a/static/grandlyon-cut/_custom.scss b/static/grandlyon-cut/_custom.scss index 819aa0b..44dda9e 100644 --- a/static/grandlyon-cut/_custom.scss +++ b/static/grandlyon-cut/_custom.scss @@ -13,6 +13,24 @@ a.button { @include button; } +a.support-link { + border-bottom: 2px solid $link-color; +} + +a.show-scopes { + text-align: center; + display: block; + margin: 2ex 0; + position: relative; + &::after { + position: absolute; + top: 0; + content: '\f0dd'; + font-family: FontAwesome; + margin-left: 5px; + } +} + .highlight { font-size: 1.45em !important; } @@ -522,29 +540,64 @@ div#main-content { @include header(100%); } } - form#a2-oidc-authorization-form { + div.a2-authorization { width: 60em; margin: 0 auto; + h2 { + text-align: center; + } + div.a2-authorization-explanation { + display: flex; + flex-wrap: wrap; + > div { + width: 28em; + margin: 15px; + @media screen and (max-width: $mobile-limit) { + width: auto; + } + } + } + span.a2-authorization-explanation-title { + display: block; + font-weight: bold; + font-style: italic; + } @media screen and (max-width: $mobile-limit) { width: auto; margin: 0 0.5em; } - .scopes { - font-size: 20px; + #scopes { + display: none; + &:target { + display: block; + } } p { margin-bottom: 5ex; } - input[type=submit] { - width: 11em; - margin: 0 0.8em; - &.lock { - background-image: url(images/lock.png); - background-repeat: no-repeat; - background-position: 85%; - background-size: 15px; - } - } + div.a2-authorization-form { + form p { + display: flex; + flex-direction: row-reverse; + justify-content: center; + flex-wrap: wrap; + } + input[type=submit] { + width: 11em; + margin: 5px 0.8em; + &.lock { + background-image: url(images/lock.png); + background-repeat: no-repeat; + background-position: 10%; + background-size: 15px; + } + &.refuse { + background-color: #ffffff; + color: #000000; + border: 2px solid #000000; + } + } + } a { font-size: 1em; } diff --git a/templates/authentic2_idp_oidc/authorization.html b/templates/authentic2_idp_oidc/authorization.html index 1800139..4b73045 100644 --- a/templates/authentic2_idp_oidc/authorization.html +++ b/templates/authentic2_idp_oidc/authorization.html @@ -1,17 +1,32 @@ {% extends "authentic2/base-page.html" %} {% block content %} {% include "registration/registration_steps.html" with active_step="share" %} -
-

Afin de poursuivre votre navigation {{ request.partner.name }} souhaite accéder aux informations de votre {{ account_label }}. - {% if scopes %} -
({% for scope in scopes %}{% if scope == "profile" %}nom, prénoms, date, lieu et pays de naissance, civilité{% elif scope == "crown" %}nom d'usage, prénoms d'usage, adresse postale, numéros de téléphone et département de naissance{% elif scope == "email" %}courriel{% endif %}{% if not forloop.last %}, {% endif %}{% endfor %}) - {% endif %} -

- {% csrf_token %} +
+

Partage d’informations {% if request.partner.url %} avec {{ request.partner.name }}{% endif %}

+
+
+ Pourquoi partager vos informations ? + Afin de poursuivre votre navigation {{ request.partner.name }} souhaite accéder aux informations de votre {{ account_label }}.
+ Les informations partagées permettent de compléter votre profil pour simplifier vos futures démarches, leur partage est sécurisé. + {% if scopes %} +
Afficher les informations partagées + {% for scope in scopes %}{% if scope == "profile" %}nom, prénoms, date, lieu et pays de naissance, civilité{% elif scope == "crown" %}nom d'usage, prénoms d'usage, adresse postale, numéros de téléphone et département de naissance{% elif scope == "email" %}courriel{% endif %}{% if not forloop.last %}, {% endif %}{% endfor %} + {% endif %} +
+
+ Que se passe-t-il si vous refusez ? + En ne partageant pas vos informations, vous ne pourrez pas accéder au service en ligne. + Cliquez ici pour en savoir plus. +
+
+
+ + {% csrf_token %}

- - + +

-

Sans cette autorisation, il ne vous sera pas possible d’aller sur les services de {{ request.partner.name }} avec votre {{ account_label }}.

- + +
+
{% endblock %}