small fix
This commit is contained in:
parent
bf20318a8d
commit
a7b1c47080
10
js/admin.js
10
js/admin.js
@ -15,7 +15,7 @@ $(document).ready(function() {
|
|||||||
btn.prop("disabled", true);
|
btn.prop("disabled", true);
|
||||||
btn.html("Logging in… <i class=\"fa fa-spin fa-circle-notch\"></i>");
|
btn.html("Logging in… <i class=\"fa fa-spin fa-circle-notch\"></i>");
|
||||||
jsCore.apiCall("/user/login", {"username": username, "password": password, "stayLoggedIn": stayLoggedIn }, function(data) {
|
jsCore.apiCall("/user/login", {"username": username, "password": password, "stayLoggedIn": stayLoggedIn }, function(data) {
|
||||||
window.location.reload();
|
document.location = "/admin/dashboard";
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
btn.html("Login");
|
btn.html("Login");
|
||||||
btn.prop("disabled", false);
|
btn.prop("disabled", false);
|
||||||
@ -25,12 +25,4 @@ $(document).ready(function() {
|
|||||||
errorDiv.show();
|
errorDiv.show();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#btnLogout").click(function() {
|
|
||||||
jsCore.apiCall("/user/logout", function(data) {
|
|
||||||
document.location = "/admin/dashboard";
|
|
||||||
}, function(err) {
|
|
||||||
alert(err);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user