From 6f12b88ad10189ba18f4375abf971a02a2dec1cf Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 1 May 2025 20:00:07 +0300 Subject: [PATCH] login: fix deprecated `submit()` function Signed-off-by: XhmikosR --- scripts/js/login.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/js/login.js b/scripts/js/login.js index f73b3228..bea57e67 100644 --- a/scripts/js/login.js +++ b/scripts/js/login.js @@ -114,16 +114,10 @@ function doLogin(password) { }); } -$("#loginform").submit(e => { +$("#loginform").on("submit", event => { // Cancel the native submit event (prevent the form from being // submitted) because we want to do a two-step challenge-response login - e.preventDefault(); - - // Check if cookie checkbox is enabled - /* if (!$("#logincookie").is(":checked")) { - alert("Please consent to using a login cookie to be able to log in. It is necessary to keep you logged in between page reloads. You can end the session by clicking on the logout button in the top right menu at any time."); - return; - }*/ + event.preventDefault(); doLogin($("#current-password").val()); });