login: fix deprecated submit() function

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
XhmikosR
2025-05-01 20:00:07 +03:00
committed by GitHub
parent e851470e70
commit 6f12b88ad1

View File

@@ -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());
});