mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 01:52:22 +03:00
Do not allow user to submit login without a username and a password
This commit is contained in:
parent
bbf8869d3b
commit
4570d0859e
2 changed files with 10 additions and 2 deletions
|
@ -18,14 +18,18 @@
|
|||
<label for="username" class="form-label">
|
||||
<?= lang('username') ?>
|
||||
</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 class="mb-5">
|
||||
<label for="password" class="form-label">
|
||||
<?= lang('password') ?>
|
||||
</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 class="d-flex justify-content-between align-items-center mb-5">
|
||||
|
|
|
@ -32,6 +32,10 @@ App.Pages.Login = (function () {
|
|||
const username = $username.val();
|
||||
const password = $password.val();
|
||||
|
||||
if (!username || !password) {
|
||||
return;
|
||||
}
|
||||
|
||||
const $alert = $('.alert');
|
||||
|
||||
$alert.addClass('d-none');
|
||||
|
|
Loading…
Reference in a new issue