From 0c6866ed842e1ac76d08c3ed9b86a63a806b66b4 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 1 Jan 2023 04:17:46 +0200 Subject: [PATCH] fix undisabling elements --- files/assets/js/bottom.js | 6 +++--- files/templates/admin/banned_domains.html | 2 +- files/templates/settings/security.html | 4 ++-- files/templates/userpage/admintools.html | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/files/assets/js/bottom.js b/files/assets/js/bottom.js index d3709c6cb..fa7e7a59b 100644 --- a/files/assets/js/bottom.js +++ b/files/assets/js/bottom.js @@ -81,11 +81,11 @@ for (const element of change_submit) { element.onchange = () => {element.form.submit()}; } -const undisableelement = document.querySelectorAll('[undisableelement]'); -for (const element of undisableelement) { +const undisable_element = document.querySelectorAll('[data-undisable_element]'); +for (const element of undisable_element) { if (element.dataset.nonce != nonce) continue element.oninput = () => { - document.getElementById(element.dataset.undisableelement).disabled = false; + document.getElementById(element.dataset.undisable_element).disabled = false; }; } diff --git a/files/templates/admin/banned_domains.html b/files/templates/admin/banned_domains.html index 0e594bef1..13f45b42a 100644 --- a/files/templates/admin/banned_domains.html +++ b/files/templates/admin/banned_domains.html @@ -32,7 +32,7 @@
- +
diff --git a/files/templates/settings/security.html b/files/templates/settings/security.html index d7ec44b35..761489783 100644 --- a/files/templates/settings/security.html +++ b/files/templates/settings/security.html @@ -213,7 +213,7 @@ - + {% set action = "Enable" %} {% else %} diff --git a/files/templates/userpage/admintools.html b/files/templates/userpage/admintools.html index ab7e64a7a..57d4a0810 100644 --- a/files/templates/userpage/admintools.html +++ b/files/templates/userpage/admintools.html @@ -46,7 +46,7 @@
- +
@@ -60,7 +60,7 @@ - + {% endif %}