grandlyon-glc: adapt to refactoring in consent management view (#56425)

This commit is contained in:
Benjamin Dauvergne 2021-08-27 10:30:42 +02:00
parent 60f28dee2f
commit b133868a6c
5 changed files with 24 additions and 63 deletions

View File

@ -175,7 +175,7 @@ div.card {
}
}
.authorized-oauth-services {
.consents {
&--list {
padding-left: 0;
list-style: none;

View File

@ -64,7 +64,7 @@
<li class="profile-edit"><a href="{% url 'profile_edit' %}">Modifier les données du compte</a></li>
{% endif %}
{% if allow_authorization_management %}
<li><a href="{% url 'authorized-oauth-services' %}">Gérer les autorisations daccès</a></li>
<li><a href="{% url 'consents' %}">Gérer les autorisations daccès</a></li>
{% endif %}
{% if allow_account_deletion %}
<li class="account-delete"><a href="{% url 'delete_account' %}">Supprimer le compte</a></li>

View File

@ -8,7 +8,7 @@
<li><a href="{% url 'account_management' %}#mes-donnees-d-identite">MES DONNÉES D'IDENTITÉ</a></li>
<li><a href="{% url 'account_management' %}#mes-donnees-complementaires">MES DONNÉES COMPLÉMENTAIRES</a></li>
{% if allow_authorization_management %}
<li><a href="{% url 'authorized-oauth-services' %}">MES CONSENTEMENTS</a></li>
<li><a href="{% url 'consents' %}">MES CONSENTEMENTS</a></li>
{% endif %}
</ul>
</div>

View File

@ -1,60 +0,0 @@
{% extends "authentic2/cut-base.html" %}
{% load i18n %}
{% block title %}
{{ block.super }} - Mes consentements
{% endblock %}
{% block cut-content %}
<div id="cut-account">
<h2>Mes consentements</h2>
{% block oidc-authorized-oauth-services-pre %}{% endblock %}
<div class="authorized-oauth-services">
{% block oidc-authorized-oauth-services-top %}
<p class="authorized-oauth-services--top">
{% if authorized_oauth_services|length_is:0 %}
{% trans "You have not given any authorization to access your account profile data." %}
{% else %}
{% trans "You have given authorizations to access your account profile data." %}
{% endif %}
</p>
{% endblock %}
<ul class="authorized-oauth-services--list">
{% for auth in authorized_oauth_services %}
<li class="authorized-oauth-services--item">
<form method="post" class="authorized-oauth-services--form">
{% csrf_token %}
{% block oidc-authorized-oauth-service %}
<div class="authorized-oauth-services--infos">
{% block oidc-authorized-oauth-service-top %}{% endblock %}
<span class="authorized-oauth-services--client">
{{ auth.client }}
</span>
<span class="authorized-oauth-services--dates">
<span class="authorized-oauth-services-dates--since">
<span class="label">{% trans "Allowed since:" %}</span>
<span class="time">{{ auth.created }}</span>
</span>
<span class="authorized-oauth-services--separator">/</span>
<span class="authorized-oauth-services--expired">
<span class="label">{% trans "Expire on:" %}</span>
<span class="time">{{ auth.expired }}</span>
</span>
</span>
</div>
<div class="authorized-oauth-services--actions">
<input type="hidden" id="auth-id" name="auth_id" value="{{ auth.id }}">
<button class="authorized-oauth-services--revoke-button">{% trans 'Revoke' %}</button>
</div>
{% block oidc-authorized-oauth-service-bottom %}{% endblock %}
{% endblock %}
</form>
</li>
{% endfor %}
</ul>
{% block oidc-authorized-oauth-services-bottom %}{% endblock %}
</div>
{% block oidc-authorized-oauth-services-post %}{% endblock %}
{% endblock %}
</div>

View File

@ -0,0 +1,21 @@
{% extends "authentic2/consents.html" %}
{% load i18n %}
{% block form-title %}
{% endblock %}
{% block title %}
{{ block.super }} - Mes consentements
{% endblock %}
{% block a2-block-pre %}
<div id="cut-nav">
<div class="cut-back"><a href="{% url 'account_management' %}">Revenir à mon compte</a></div>
</div>
<div id="cut-account">
<h2>Mes consentements</h2>
{% endblock %}
{% block a2-block-post %}
</div>
{% endblock %}