{% extends "authentic2/base-page.html" %}
{% load i18n %}
{% block content %}
<h2>{% trans "Authentication access check" %}</h2>
<form method="post" id="a2-oidc-authorization-form">
    <p>{% blocktrans with client_name=client.name %}Do you want to be authenticated on service {{ client_name }} ?{% endblocktrans %}</p>
    {% if scopes %}
      <p>{% trans "The following informations will be sent to the service:" %}</p>
      <ul>
        {% for scope in scopes %}
          {% if scope == "profile" %}
            <li>{% trans "Your first and last name, your username" %}</li>
          {% elif scope == "email" %}
            <li>{% trans "Your email:" %} {{ user.email }}</li>
          {% endif %}
        {% endfor %}
      </ul>
    {% endif %}
    {% csrf_token %}
    <p class="a2-oidc-authorization-form--do-not-ask-again">
      <label for="id_do_not_ask_again"><input id="id_do_not_ask_again" type="checkbox" name="do_not_ask_again" value="on"/><span>{% trans "Do not ask again" %}</span></label>
    </p>
    <button name="accept">{% trans "Accept" %}</button>
    <button name="refuse">{% trans "Refuse" %}</button>
  </form>
{% endblock %}
