Projet

Général

Profil

Bug #45200 » accounts_authorized_oauth_services.html

Frédéric Péters, 25 juillet 2020 11:24

 
1
{% extends "authentic2/base-page.html" %}
2
{% load i18n %}
3

    
4
{% block page-title %}
5
  {{ block.super }} - {{ view.title }}
6
{% endblock %}
7

    
8
{% block breadcrumb %}
9
  {{ block.super }}
10
  <a href="..">{% trans "Your account" %}</a>
11
  <a href="">{{ view.title }}</a>
12
{% endblock %}
13

    
14
{% block content %}
15
{% block oidc-authorized-oauth-services-pre %}{% endblock %}
16
<div class="authorized-oauth-services">
17
  {% block oidc-authorized-oauth-services-top %}
18
  <p class="authorized-oauth-services--top">
19
    {% if authorized_oauth_services|length_is:0 %}
20
    {% trans "You have not granted service access to your account profile data." %}
21
    {% else %}
22
    {% blocktrans count counter=authorized_oauth_services|length %}
23
    You have granted one service access to your account profile data.
24
    {% plural %}
25
    You have granted {{ counter }} services access to your account profile data.
26
    {% endblocktrans %}
27
    {% endif %}
28
  </p>
29
  {% endblock %}
30
  <ul class="authorized-oauth-services--list">
31
    {% for auth in authorized_oauth_services %}
32
    <li class="authorized-oauth-services--item">
33
      <form method="post" class="authorized-oauth-services--form">
34
        {% csrf_token %}
35
        {% block oidc-authorized-oauth-service %}
36
        <div class="authorized-oauth-services--infos">
37
        {% block oidc-authorized-oauth-service-top %}{% endblock %}
38
        <span class="authorized-oauth-services--client">
39
          {{ auth.client }}
40
        </span>
41
        <span class="authorized-oauth-services--dates">
42
          <span class="authorized-oauth-services-dates--since">
43
            <span class="label">{% trans "Allowed since:" %}</span>
44
            <span class="time">{{ auth.created }}</span>
45
          </span>
46
          <span class="authorized-oauth-services--separator">/</span>
47
          <span class="authorized-oauth-services--expired">
48
            <span class="label">{% trans "Expire on:" %}</span>
49
            <span class="time">{{ auth.expired }}</span>
50
          </span>
51
        </span>
52
        </div>
53
        <div class="authorized-oauth-services--actions">
54
        <input type="hidden" id="auth-id" name="auth_id" value="{{ auth.id }}">
55
        <button class="authorized-oauth-services--revoke-button">{% trans 'Revoke' %}</button>
56
        </div>
57
        {% block oidc-authorized-oauth-service-bottom %}{% endblock %}
58
        {% endblock %}
59
      </form>
60
    </li>
61
    {% endfor %}
62
  </ul>
63
  </table>
64
  {% block oidc-authorized-oauth-services-bottom %}{% endblock %}
65
</div>
66
{% block oidc-authorized-oauth-services-post %}{% endblock %}
67
{% endblock %}