pedagogy: simpler generation for department radio buttons

This commit is contained in:
Antoine Bartuccio 2019-07-08 15:36:30 +02:00
parent fd1f89de1d
commit 0d13014e8a
Signed by: klmp200
GPG Key ID: E7245548C53F904B
1 changed files with 1 additions and 2 deletions

View File

@ -21,8 +21,7 @@
<button class="button-search">{% trans %}Search{% endtrans %}</button>
</p>
<div class="radio-guide">
{% for department in [("EDIM", "EDIM"), ("ENERGIE", "EE"), ("IMSI", "IMSI"), ("INFO", "GI"), ("GMC", "MC"), ("HUMA", "HUMA"), ("TC", "TC")] %}
{% set display_name, real_name = department %}
{% for (display_name, real_name) in [("EDIM", "EDIM"), ("ENERGIE", "EE"), ("IMSI", "IMSI"), ("INFO", "GI"), ("GMC", "MC"), ("HUMA", "HUMA"), ("TC", "TC")] %}
<input type="radio" name="department" id="radio{{ real_name }}" value="{{ real_name }}"><label for="radio{{ real_name }}">{% trans %}{{ display_name }}{% endtrans %}</label>
{% endfor %}
</div>