mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-27 09:03:09 +03:00
Use the App.Vars instead of GlobalVariables in login.js.
This commit is contained in:
parent
778edf0b21
commit
2a11f6045e
1 changed files with 3 additions and 3 deletions
|
@ -21,10 +21,10 @@
|
||||||
function onLoginFormSubmit(event) {
|
function onLoginFormSubmit(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
const url = GlobalVariables.baseUrl + '/index.php/login/validate';
|
const url = App.Vars.baseUrl + '/index.php/login/validate';
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
csrf_token: GlobalVariables.csrfToken,
|
csrf_token: App.Vars.csrf_token,
|
||||||
username: $('#username').val(),
|
username: $('#username').val(),
|
||||||
password: $('#password').val()
|
password: $('#password').val()
|
||||||
};
|
};
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
$.post(url, data).done((response) => {
|
$.post(url, data).done((response) => {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
window.location.href = GlobalVariables.destUrl;
|
window.location.href = App.Vars.dest_url;
|
||||||
} else {
|
} else {
|
||||||
$alert.text(App.Lang.login_failed);
|
$alert.text(App.Lang.login_failed);
|
||||||
$alert.removeClass('d-none alert-danger alert-success').addClass('alert-danger');
|
$alert.removeClass('d-none alert-danger alert-success').addClass('alert-danger');
|
||||||
|
|
Loading…
Reference in a new issue