mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 10:02:33 +03:00
Do not allow user to submit login without a username and a password
This commit is contained in:
parent
babcc774dd
commit
f2cdfb871f
2 changed files with 10 additions and 2 deletions
|
@ -18,14 +18,18 @@
|
||||||
<label for="username" class="form-label">
|
<label for="username" class="form-label">
|
||||||
<?= lang('username') ?>
|
<?= lang('username') ?>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="username" placeholder="<?= lang('enter_username_here') ?>" class="form-control"/>
|
<input type="text" id="username" placeholder="<?= lang(
|
||||||
|
'enter_username_here',
|
||||||
|
) ?>" class="form-control" required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-5">
|
<div class="mb-5">
|
||||||
<label for="password" class="form-label">
|
<label for="password" class="form-label">
|
||||||
<?= lang('password') ?>
|
<?= lang('password') ?>
|
||||||
</label>
|
</label>
|
||||||
<input type="password" id="password" placeholder="<?= lang('enter_password_here') ?>" class="form-control"/>
|
<input type="password" id="password" placeholder="<?= lang(
|
||||||
|
'enter_password_here',
|
||||||
|
) ?>" class="form-control" required/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex justify-content-between align-items-center mb-5">
|
<div class="d-flex justify-content-between align-items-center mb-5">
|
||||||
|
|
|
@ -32,6 +32,10 @@ App.Pages.Login = (function () {
|
||||||
const username = $username.val();
|
const username = $username.val();
|
||||||
const password = $password.val();
|
const password = $password.val();
|
||||||
|
|
||||||
|
if (!username || !password) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const $alert = $('.alert');
|
const $alert = $('.alert');
|
||||||
|
|
||||||
$alert.addClass('d-none');
|
$alert.addClass('d-none');
|
||||||
|
|
Loading…
Reference in a new issue