Projet

Général

Profil

0001-templates-use-non-legacy-blocks-context-variable-for.patch

Frédéric Péters, 27 novembre 2018 16:03

Télécharger (1,19 ko)

Voir les différences:

Subject: [PATCH 1/2] templates: use non-legacy "blocks" context variable for
 login template (#28371)

 templates/authentic2/login.html | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
templates/authentic2/login.html
14 14

  
15 15
{% block content %}
16 16

  
17
<div id="login-page" class="methods{{methods|length}}">
17
<div id="login-page" class="methods{% firstof visible_blocks_count blocks|length %}">
18 18

  
19
{% for name, content in methods %}
19
{% for id, login_block in blocks.iteritems %}
20 20
<div class="block">
21
{% if methods|length == 1 %}
22
<h2>{% if forloop.counter0 %}{{name}}{% else %}Connexion{% endif %}</h2>
21
{% if blocks|length == 1 %}
22
<h2>Connexion</h2>
23 23
{% endif %}
24
<div>
25
{{ content|safe }}
24
<div {% if login_block.is_hidden %}style="display: none"{% endif %}>
25
{{ login_block.content|safe }}
26 26
</div>
27 27
</div>
28 28
{% endfor %}
29
-