Code refactoring and improvements for the login page.

This commit is contained in:
Alex Tselegidis 2022-01-17 14:27:10 +01:00
parent ce853c99ef
commit 7481ebca65

View file

@ -16,6 +16,8 @@
*/ */
App.Pages.Login = (function () { App.Pages.Login = (function () {
const $loginForm = $('#login-form'); const $loginForm = $('#login-form');
const $username = $('#username');
const $password = $('#password');
/** /**
* Login Button "Click" * Login Button "Click"
@ -30,8 +32,8 @@ App.Pages.Login = (function () {
const data = { const data = {
csrf_token: App.Vars.csrf_token, csrf_token: App.Vars.csrf_token,
username: $('#username').val(), username: $username.val(),
password: $('#password').val() password: $password.val()
}; };
const $alert = $('.alert'); const $alert = $('.alert');