ai-ui/overrides/user/views/default/login.php

48 lines
1.4 KiB
PHP

<?php
use function Piko\I18n\__;
assert($this instanceof Piko\View);
/**
* @var $message boolean | array
* @var $canRegister boolean
*/
$this->title = __('user', 'Login');
$this->params['breadcrumbs'][] = $this->title;
assert(is_array($message));
?>
<main class="form-signin w-100 m-auto">
<?php if (!empty($message)): ?>
<div class="container alert alert-<?= $message['type'] ?> alert-dismissible fade show" role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
<?= $message['content'] ?>
</div>
<?php endif ?>
<form action="<?= $this->getUrl('user/default/login') ?>" id="login-form" method="post">
<div class="form-floating">
<input type="text" class="form-control" id="username" name="username" placeholder="<?= __('user', 'Username') ?>">
<label for="username"><?= __('user', 'Username') ?></label>
</div>
<div class="form-floating">
<input type="password" class="form-control" id="loginform-password" name="password" placeholder="<?= __('user', 'Password') ?>">
<label for="loginform-password"><?= __('user', 'Password') ?></label>
</div>
<button class="btn btn-primary w-100 py-2" type="submit"><?= __('user', 'Login') ?></button>
<p class="mt-5 mb-3 text-body-secondary">
<a href="<?= $this->getUrl('user/default/reminder')?>"><?= __('user', 'Forget password?') ?></a>
</p>
</form>
</main>