{% load gnm %}
<h2>Les services par commune</h2>
<div>
{% with commune=json|as_commune %}
{% if commune %}
<p class="my-collectivity">Ma commune :
<a href="{{commune.url}}" class="commune commune-{{commune.slug}}">{{commune.label}}</a></p>
{% endif %}
{% endwith %}

{% get_gnm_collectivities as collectivities %}
<select id="collectivities" aria-labelled-by="commune_hint_text">
 <option>Votre commune</option>
 {% for collectivity in collectivities %}
 <option data-url="{{collectivity.url}}">{{collectivity.label}}</option>
 {% endfor %}
</select>

<p id="commune_hint_text">
{{text}}
</p>
</div>
