publik-base-theme/templates/variants/izi-ici/combo/cells/services-communes/link-list-cell.html

25 lines
716 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% block cell-content %}
<h2 class="commune--title">{{ title }}</h2>
<div class="cell--body">
Sélectionner une autre collectivité du territoire dIziici pour accéder à ses services en ligne
<form>
<select id="commune--select-{{ cell.id }}" class="commune--select">
<option value="">Sélectionnez</option>
{% for link in links %}
<option value="{{ link.url }}">{{ link.title }}</option>
{% endfor %}
</select>
</form>
</div>
{% endblock %}
<script>
$(function() {
$('#commune--select-{{ cell.id }}').change(function(e){
const link = this.options[this.selectedIndex].value;
if (link) {
window.location.href = link;
}
})
});
</script>