templates: order communes in <select> box (#13098)

This commit is contained in:
Frédéric Péters 2016-09-26 15:57:52 +02:00
parent a122f2791f
commit d09c717c8f
1 changed files with 3 additions and 3 deletions

View File

@ -59,9 +59,9 @@ Métropole mais aussi celles des différentes communes de la métropole.</p>
<p>
<select onchange="displayCommune(this.value)">
<option value="" selected>Choisissez une commune...</option>
{% for slug, categories in form_categories.iteritems %}
{% if categories.title != request.session.mellon_session.city.0 and slug != 'agglo' %}
<option value="{{ slug }}">{{ categories.title }}</option>
{% for categories in form_categories.values|dictsort:"title" %}
{% if categories.title != request.session.mellon_session.city.0 and categories.slug != 'agglo' %}
<option value="{{ categories.slug }}">{{ categories.title }}</option>
{% endif %}
{% endfor %}
</select>