templates: add template for user authorizations (#46181)
This commit is contained in:
parent
b8ff65af02
commit
16ebc1c972
|
@ -0,0 +1,66 @@
|
|||
{% extends "authentic2/cut-base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% endblock %}
|
||||
|
||||
{% 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 granted service access to your account profile data." %}
|
||||
{% else %}
|
||||
{% blocktrans count counter=authorized_oauth_services|length %}
|
||||
You have granted one service access to your account profile data.
|
||||
{% plural %}
|
||||
You have granted {{ counter }} services access to your account profile data.
|
||||
{% endblocktrans %}
|
||||
{% 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>
|
|
@ -0,0 +1,33 @@
|
|||
{% extends "authentic2/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
{% block back %}
|
||||
<div id="cut-nav">
|
||||
<div class="cut-back"><a href="{% url 'account_management' %}">Revenir à mon compte</a></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block cut-content %}
|
||||
<div id="cut-account">
|
||||
<h2 class="cut-edit-title">{% block cut-edit-title %}{% endblock %}</h2>
|
||||
<form method="post" action=".">
|
||||
{{ form.next_url }}
|
||||
{% csrf_token %}
|
||||
<div class="cut-edit">
|
||||
{% if form.is_bound and not form.is_valid %}
|
||||
<ul class="errorlist nonfield">
|
||||
<li>Le formulaire comporte des erreurs qui sont indiquées ci-dessous.</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% block form %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<p class="center">
|
||||
<button>Enregistrer mes données</button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
@ -1,11 +1,7 @@
|
|||
{% extends "authentic2/base.html" %}
|
||||
{% extends "authentic2/cut-base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div id="cut-nav">
|
||||
<div class="cut-back"><a href="{% url 'account_management' %}">Revenir à mon compte</a></div>
|
||||
</div>
|
||||
|
||||
{% block cut-content %}
|
||||
<div id="cut-account">
|
||||
<h2 class="cut-edit-title">{% block cut-edit-title %}{% endblock %}</h2>
|
||||
<form method="post" action=".">
|
||||
|
|
Reference in New Issue