python3: use items in templates (#40501)
This commit is contained in:
parent
c745e0bb60
commit
094ec4b2f6
|
@ -21,7 +21,7 @@
|
|||
{% block login-top %}{% endblock %}
|
||||
|
||||
{% block login-blocks %}
|
||||
{% for id, login_block in blocks.iteritems %}
|
||||
{% for id, login_block in blocks.items %}
|
||||
<div class="block block-{{login_block.authenticator.id}} block-{{id}}">
|
||||
{% if blocks|length == 1 %}
|
||||
<h2>Connexion</h2>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "authentic2/login.html" %}
|
||||
|
||||
{% block login-blocks %}
|
||||
{% for id, login_block in blocks.iteritems %}
|
||||
{% for id, login_block in blocks.items %}
|
||||
{% if not login_block.is_hidden %}
|
||||
<div class="block block-{{id}}">
|
||||
<h2>{% if id == "password" %}S'identifier{% else %}{{ login_block.name }}{% endif %}</h2>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
{% block login-blocks %}
|
||||
{% with origin=request|is_coming_for %}
|
||||
{% for id, login_block in blocks.iteritems %}
|
||||
{% for id, login_block in blocks.items %}
|
||||
<div class="block block-{{id}} block-{{login_block.authenticator.id}} for-{{origin}}">
|
||||
{% if blocks|length == 1 %}
|
||||
<h2>Connexion</h2>
|
||||
|
|
|
@ -15,7 +15,7 @@ ci-dessous :</p>
|
|||
{% block login-blocks %}
|
||||
|
||||
<div id="login-blocks">
|
||||
{% for id, login_block in blocks.iteritems %}
|
||||
{% 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 %}
|
||||
<h2>{% if id == "password" %}Vos identifiants{% else %}{{ login_block.name }}{% endif %}</h2>
|
||||
|
|
|
@ -15,7 +15,7 @@ ci-dessous :</p>
|
|||
{% block login-blocks %}
|
||||
|
||||
<div id="login-blocks">
|
||||
{% for id, login_block in blocks.iteritems %}
|
||||
{% 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 %}
|
||||
<h2>{% if id == "password" %}Vos identifiants{% else %}{{ login_block.name }}{% endif %}</h2>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{# only reverse blocks order: SAML first, login/pass after #}
|
||||
|
||||
{% block login-blocks %}
|
||||
{% for id, login_block in blocks.iteritems reversed %}
|
||||
{% for id, login_block in blocks.items reversed %}
|
||||
<div class="block block-{{id}}" {% if login_block.is_hidden %}style="display: none"{% endif %}>
|
||||
<div>
|
||||
{{ login_block.content|safe }}
|
||||
|
|
Loading…
Reference in New Issue