authentic2: compute authentication methods from available blocks (#38063)

This commit is contained in:
Serghei Mihai 2019-12-03 14:01:22 +01:00
parent a8575117ac
commit aeace20ade
4 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@
{% block content %}
{% block login-pre %}{% endblock %}
<div id="login-page" class="methods{% firstof visible_blocks_count blocks|length %}">
<div id="login-page" class="methods{{ blocks|length }}">
{% block login-top %}{% endblock %}
{% block login-blocks %}

View File

@ -1,7 +1,7 @@
{% extends "authentic2/login.html" %}
{% block content %}
<div id="login-page" class="methods{% firstof visible_blocks_count blocks|length %}">
<div id="login-page" class="methods{{ blocks|length }}">
{% for name, content in methods reversed %}
<div class="block">
{% if name == "FranceConnect" %}

View File

@ -2,7 +2,7 @@
{% block login-pre %}
<div class="a2-block" id="registration-title"><h2>Se connecter</h2>
{% if visible_blocks_count > 1 %}
{% if blocks|length > 1 %}
<p>Pour accéder à ces téléservices, vous devez vous identifier en
choisissant l'une des possibilités ci-dessous :</p>
{% else %}
@ -17,7 +17,7 @@ ci-dessous :</p>
<div id="login-blocks">
{% for id, login_block in blocks.items %}
<div class="a2-block" id="frontend-login-{{id}}" {% if login_block.is_hidden %}style="display: none"{% endif %}>
{% if visible_blocks_count > 1 %}
{% if blocks|length > 1 %}
<h2>{% if id == "password" %}Vos identifiants{% else %}{{ login_block.name }}{% endif %}</h2>
{% endif %}
<div>

View File

@ -2,7 +2,7 @@
{% block login-pre %}
<div class="a2-block" id="registration-title"><h2>Se connecter</h2>
{% if visible_blocks_count > 1 %}
{% if blocks|length > 1 %}
<p>Pour accéder à ces téléservices, vous devez vous identifier en
choisissant l'une des possibilités ci-dessous :</p>
{% else %}
@ -17,7 +17,7 @@ ci-dessous :</p>
<div id="login-blocks">
{% for id, login_block in blocks.items %}
<div class="a2-block" id="frontend-login-{{id}}" {% if login_block.is_hidden %}style="display: none"{% endif %}>
{% if visible_blocks_count > 1 %}
{% if blocks|length > 1 %}
<h2>{% if id == "password" %}Vos identifiants{% else %}{{ login_block.name }}{% endif %}</h2>
{% endif %}
<div>