44 lines
1.3 KiB
PHTML
44 lines
1.3 KiB
PHTML
<?php
|
|
|
|
/**
|
|
* @var array<int, string> $errors
|
|
* @var string $email
|
|
*/
|
|
|
|
use MintyPHP\Buffer;
|
|
use MintyPHP\Session;
|
|
|
|
Buffer::set('title', t('Forgot password'));
|
|
$errorNoticeId = !empty($errors) ? 'auth-forgot-error-notice' : '';
|
|
?>
|
|
|
|
<article>
|
|
<header>
|
|
<hgroup>
|
|
<h1><?php e(t('Forgot password')); ?></h1>
|
|
<p><?php e(t('Enter your email address and we will send you a verification code.')); ?></p>
|
|
</hgroup>
|
|
</header>
|
|
<form method="post">
|
|
<label for="email">
|
|
<span><?php e(t('Email')); ?></span>
|
|
<input required type="email" name="email" id="email" value="<?php e($email ?? ''); ?>" autocomplete="email" autofocus <?php if ($errorNoticeId !== ''): ?>aria-invalid="true" aria-describedby="<?php e($errorNoticeId); ?>"<?php endif; ?> />
|
|
</label>
|
|
<?php if (!empty($errors)): ?>
|
|
<div id="<?php e($errorNoticeId); ?>" class="notice" data-variant="error" role="alert" aria-live="assertive" tabindex="-1">
|
|
<ul>
|
|
<?php foreach ($errors as $error): ?>
|
|
<li><?php e($error); ?></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
<?php endif; ?>
|
|
<button type="submit"><?php e(t('Send code')); ?></button>
|
|
<?php Session::getCsrfInput(); ?>
|
|
</form>
|
|
<hr>
|
|
<p class="text-align-center">
|
|
<a href="<?php e(lurl('login')); ?>"><?php e(t('Back to Login')); ?></a>
|
|
</p>
|
|
</article>
|