mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 02:38:28 +00:00
Disable all inputs on login submission, re-enable them on error
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
* This file is copyright under the latest version of the EUPL.
|
||||
* Please see LICENSE file for your rights under this license. */
|
||||
|
||||
/* global utils:false */
|
||||
|
||||
function getParams() {
|
||||
var GETDict = {};
|
||||
window.location.search
|
||||
@@ -102,6 +104,7 @@ function wrongPassword(isError = false, isSuccess = false, data = null) {
|
||||
|
||||
function doLogin(password) {
|
||||
wrongPassword(false, false, null);
|
||||
utils.disableAll();
|
||||
$.ajax({
|
||||
url: "/api/auth",
|
||||
method: "POST",
|
||||
@@ -115,6 +118,7 @@ function doLogin(password) {
|
||||
})
|
||||
.fail(function (data) {
|
||||
wrongPassword(true, false, data);
|
||||
utils.enableAll();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user