Use the App.Vars instead of GlobalVariables in login.js.

This commit is contained in:
Alex Tselegidis 2022-01-14 08:34:46 +01:00
parent 778edf0b21
commit 2a11f6045e

View file

@ -21,10 +21,10 @@
function onLoginFormSubmit(event) {
event.preventDefault();
const url = GlobalVariables.baseUrl + '/index.php/login/validate';
const url = App.Vars.baseUrl + '/index.php/login/validate';
const data = {
csrf_token: GlobalVariables.csrfToken,
csrf_token: App.Vars.csrf_token,
username: $('#username').val(),
password: $('#password').val()
};
@ -35,7 +35,7 @@
$.post(url, data).done((response) => {
if (response.success) {
window.location.href = GlobalVariables.destUrl;
window.location.href = App.Vars.dest_url;
} else {
$alert.text(App.Lang.login_failed);
$alert.removeClass('d-none alert-danger alert-success').addClass('alert-danger');