1<?php 2 3declare(strict_types=1); 4 5use Fisharebest\Webtrees\Http\RequestHandlers\LoginAction; 6use Fisharebest\Webtrees\Http\RequestHandlers\PasswordRequestAction; 7use Fisharebest\Webtrees\Http\RequestHandlers\PasswordRequestPage; 8use Fisharebest\Webtrees\Http\RequestHandlers\RegisterPage; 9use Fisharebest\Webtrees\Http\RequestHandlers\UserPage; 10use Fisharebest\Webtrees\I18N; 11use Fisharebest\Webtrees\Tree; 12 13/** 14 * @var bool $allow_register 15 * @var Tree $tree 16 */ 17 18?> 19 20<form method="post" action="<?= route(LoginAction::class, ['tree' => $tree->name()]) ?>" name="login-form"> 21 <input type="hidden" name="url" value="<?= e(route(UserPage::class, ['tree' => $tree->name()])) ?>"> 22 23 <div class="mb-3"> 24 <label for="username"> 25 <?= I18N::translate('Username') ?> 26 </label> 27 <input type="text" id="username" name="username" class="form-control"> 28 </div> 29 30 <div class="mb-3"> 31 <label for="password"> 32 <?= I18N::translate('Password') ?> 33 </label> 34 <input type="password" id="password" name="password" class="form-control" autocomplete="current-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')) ?>"> 35 </div> 36 37 <div> 38 <button type="submit" class="btn btn-primary"> 39 <?= /* I18N: A button label. */ I18N::translate('sign in') ?> 40 </button> 41 42 <a class="btn btn-link" href="<?= e(route(PasswordRequestPage::class, ['tree' => $tree->name()])) ?>"> 43 <?= I18N::translate('Forgot password?') ?> 44 </a> 45 46 <?php if ($allow_register) : ?> 47 <a class="btn btn-link" href="<?= e(route(RegisterPage::class, ['tree' => $tree->name()])) ?>"> 48 <?= I18N::translate('Request a new user account') ?> 49 </a> 50 <?php endif ?> 51 </div> 52 53 <?= csrf_field() ?> 54</form> 55