Template update

This commit is contained in:
Tom Hubrecht 2021-10-04 09:48:12 +02:00
parent c2931aa81f
commit 870b16cea5
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@
</span> </span>
</a> </a>
<a class="tag is-info is-light is-outlined has-tooltip-primary mb-0 modal-button" data-tooltip="{% trans "Modifier" %}" data-post_url="{% url 'election.mod-option' o.pk %}" data-target="modal-option" data-json='{{ o.to_json }}' data-title="{% trans "Modifier l'option" %}" data-type="option" data-parent="o_{{ o.pk }}"> <a class="tag is-info is-light is-outlined has-tooltip-primary mb-0 modal-button" data-tooltip="{% trans "Modifier" %}" data-post_url="{% url 'election.mod-option' o.pk %}" data-target="modal-option" data-json='{{ o.to_json }}' data-title="{% trans "Modifier l'option" %}" data-parent="o_{{ o.pk }}">
<span class="icon"> <span class="icon">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
</span> </span>

View file

@ -52,10 +52,10 @@
_$('.del', e).forEach(_del); _$('.del', e).forEach(_del);
if (r.action == 'create') { if (r.action == 'create') {
_id(f.dataset.next).appendChild(e.childNodes[1]); _id(f.dataset.next).appendChild(e.firstElementChild);
} else if (r.action == 'update') { } else if (r.action == 'update') {
const n = _id(f.dataset.origin); const n = _id(f.dataset.origin);
n.parentNode.replaceChild(e.childNodes[1], n); n.parentNode.replaceChild(e.firstElementChild, n);
} }
// On ferme le modal // On ferme le modal
document.documentElement.classList.remove('is-clipped'); document.documentElement.classList.remove('is-clipped');