castopod/app/Views/auth/login.php
Yassine Doghri a1a28de702 refactor: rewrite form pages using form helper
- add installGateway to app config
- update route names and groups
- remove `author_name` and `author_email` from `episodes` table
- remove `author_name` and `author_email` from `podcasts` table
- remove `owner_id` + add `created_by` and `updated_by` fields in `podcasts` and `episodes` tables
- remove unnecessary comments in database fields
- remove confirm password inputs from auth forms for better ux
- rename `pub_date` field to `published_at` and add publication time field in episode form

closes #14, #28
2020-10-15 14:41:32 +00:00

56 lines
1.3 KiB
PHP

<?= helper('form') ?>
<?= $this->extend($config->viewLayout) ?>
<?= $this->section('title') ?>
<?= lang('Auth.loginTitle') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<?= form_open(route_to('login'), ['class' => 'flex flex-col']) ?>
<?= csrf_field() ?>
<?= form_label(lang('Auth.emailOrUsername'), 'login') ?>
<?= form_input([
'id' => 'login',
'name' => 'login',
'class' => 'form-input mb-4',
'required' => 'required',
]) ?>
<?= form_label(lang('Auth.password'), 'password') ?>
<?= form_input([
'id' => 'password',
'name' => 'password',
'class' => 'form-input mb-4',
'type' => 'password',
'required' => 'required',
]) ?>
<?= form_button([
'content' => lang('Auth.loginAction'),
'class' => 'px-4 py-2 ml-auto border',
'type' => 'submit',
]) ?>
<?= form_close() ?>
<?= $this->endSection() ?>
<?= $this->section('footer') ?>
<div class="flex flex-col items-center py-4 text-sm text-center">
<?php if ($config->allowRegistration): ?>
<a class="underline hover:no-underline" href="<?= route_to(
'register'
) ?>"><?= lang('Auth.needAnAccount') ?></a>
<?php endif; ?>
<a class="underline hover:no-underline" href="<?= route_to(
'forgot'
) ?>"><?= lang('Auth.forgotYourPassword') ?></a>
</div>
<?= $this->endSection() ?>