1<?php 2 3declare(strict_types=1); 4 5use Fisharebest\Webtrees\Http\RequestHandlers\LoginAction; 6use Fisharebest\Webtrees\Http\RequestHandlers\PasswordRequestPage; 7use Fisharebest\Webtrees\Http\RequestHandlers\RegisterPage; 8use Fisharebest\Webtrees\I18N; 9use Fisharebest\Webtrees\Tree; 10 11/** 12 * @var bool $can_register 13 * @var string $error 14 * @var Tree|null $tree 15 * @var string $url 16 * @var string $username 17 * @var string $warning 18 * @var string $welcome 19 */ 20?> 21 22<h2 class="wt-page-title"> 23 <?= I18N::translate('Welcome to this genealogy website') ?> 24</h2> 25 26<p> 27 <?= nl2br($welcome, false) ?> 28</p> 29 30<form method="post" action="<?= e(route(LoginAction::class, ['tree' => $tree?->name()])) ?>" class="wt-page-options wt-page-options-login"> 31 <input type="hidden" name="url" value="<?= e($url) ?>"> 32 33 <div class="row"> 34 <label class="col-sm-3 col-form-label wt-page-options-label" for="username"> 35 <?= I18N::translate('Username') ?> 36 </label> 37 <div class="col-sm-9 wt-page-options-value"> 38 <input class="form-control" type="text" id="username" name="username" required="required" value="<?= e($username) ?>" autocomplete="username"> 39 </div> 40 </div> 41 42 <div class="row mb-3"> 43 <label class="col-sm-3 col-form-label wt-page-options-label" for="password"> 44 <?= I18N::translate('Password') ?> 45 </label> 46 <div class="col-sm-9 wt-page-options-value"> 47 <input autocomplete="current-password" class="form-control" id="password" name="password" required="required" type="password" data-wt-show-password-text="<?= e(I18N::translate('show')) ?>" data-wt-show-password-title="<?= e(I18N::translate('Show password')) ?>" data-wt-hide-password-text="<?= e(I18N::translate('hide')) ?>" data-wt-hide-password-title="<?= e(I18N::translate('Hide password')) ?>"> 48 </div> 49 </div> 50 51 <div class="row"> 52 <div class="col-sm-3 col-form-label wt-page-options-label"> 53 </div> 54 <div class="col-sm-9 wt-page-options-value"> 55 <button class="btn btn-primary" type="submit"> 56 <?= /* I18N: A button label. */ 57 I18N::translate('sign in') ?> 58 </button> 59 60 <a class="btn btn-link" href="<?= e(route(PasswordRequestPage::class, ['tree' => $tree?->name()])) ?>"> 61 <?= I18N::translate('Forgot password?') ?> 62 </a> 63 64 <?php if ($can_register) : ?> 65 <a class="btn btn-link" href="<?= e(route(RegisterPage::class, ['tree' => $tree?->name()])) ?>"> 66 <?= I18N::translate('Request a new user account') ?> 67 </a> 68 <?php endif ?> 69 </div> 70 </div> 71 72 <?= csrf_field() ?> 73</form> 74