From 870b16cea5f5d0aba210cde4a565bada6bb0f8a7 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Mon, 4 Oct 2021 09:48:12 +0200 Subject: [PATCH] Template update --- elections/templates/elections/admin/option.html | 2 +- elections/templates/elections/election_admin.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elections/templates/elections/admin/option.html b/elections/templates/elections/admin/option.html index cae4b93..27abcd7 100644 --- a/elections/templates/elections/admin/option.html +++ b/elections/templates/elections/admin/option.html @@ -9,7 +9,7 @@ - + diff --git a/elections/templates/elections/election_admin.html b/elections/templates/elections/election_admin.html index 4101114..1da93d6 100644 --- a/elections/templates/elections/election_admin.html +++ b/elections/templates/elections/election_admin.html @@ -52,10 +52,10 @@ _$('.del', e).forEach(_del); if (r.action == 'create') { - _id(f.dataset.next).appendChild(e.childNodes[1]); + _id(f.dataset.next).appendChild(e.firstElementChild); } else if (r.action == 'update') { const n = _id(f.dataset.origin); - n.parentNode.replaceChild(e.childNodes[1], n); + n.parentNode.replaceChild(e.firstElementChild, n); } // On ferme le modal document.documentElement.classList.remove('is-clipped');