mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 02:38:28 +00:00
login: fix deprecated submit() function
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -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());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user