From 51a0ce220cf4f6a864c1d11c7ed83a0f820f5c2f Mon Sep 17 00:00:00 2001 From: billz Date: Sat, 22 Mar 2025 03:12:46 -0700 Subject: [PATCH] Update w/ disableValidation() to support logout btn --- app/js/custom.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/js/custom.js b/app/js/custom.js index 7d9e92e9..7b036913 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -1019,6 +1019,14 @@ document.addEventListener("DOMContentLoaded", function () { } }); +function disableValidation(form) { + form.removeAttribute("novalidate"); + form.classList.remove("needs-validation"); + form.querySelectorAll("[required]").forEach(function (field) { + field.removeAttribute("required"); + }); +} + $(document).ready(function() { const $htmlElement = $('html'); const $modeswitch = $('#night-mode');