Skip to content

Commit

Permalink
Merge pull request #1 from alextselegidis/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
tm8544 committed Apr 15, 2024
2 parents e7a757e + 5b2ce2e commit b1eb76a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
5 changes: 5 additions & 0 deletions application/controllers/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ public function __construct()
*/
public function index()
{
if (session('user_id')) {
redirect('calendar');
return;
}

html_vars([
'page_title' => lang('login'),
'base_url' => config('base_url'),
Expand Down
11 changes: 11 additions & 0 deletions application/views/emails/appointment_deleted_email.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@
</td>
</tr>

<?php if (!empty($appointment['status'])): ?>
<tr>
<td class="label" style="padding: 3px;font-weight: bold;">
<?= lang('status') ?>
</td>
<td style="padding: 3px;">
<?= e($appointment['status']) ?>
</td>
</tr>
<?php endif; ?>

<tr>
<td class="label" style="padding: 3px;font-weight: bold;">
<?= lang('description') ?>
Expand Down
11 changes: 11 additions & 0 deletions application/views/emails/appointment_saved_email.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@
</td>
</tr>

<?php if (!empty($appointment['status'])): ?>
<tr>
<td class="label" style="padding: 3px;font-weight: bold;">
<?= lang('status') ?>
</td>
<td style="padding: 3px;">
<?= e($appointment['status']) ?>
</td>
</tr>
<?php endif; ?>

<tr>
<td class="label" style="padding: 3px;font-weight: bold;">
<?= lang('description') ?>
Expand Down
8 changes: 6 additions & 2 deletions application/views/pages/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
4 changes: 4 additions & 0 deletions assets/js/pages/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit b1eb76a

Please sign in to comment.