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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
646 B
HTML
Raw Normal View History

2022-01-17 17:08:52 +01:00
{% block cell-content %}
<h2 class="commune--title cell--title">{{ title }}</h2>
2022-01-17 17:08:52 +01:00
<div class="cell--body">
<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>