14c9729fbSGreg Roach<?php 256f9a9c1SGreg Roach 310e06497SGreg Roachdeclare(strict_types=1); 410e06497SGreg Roach 556f9a9c1SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\LoginAction; 656f9a9c1SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PasswordRequestPage; 756f9a9c1SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\RegisterPage; 84c9729fbSGreg Roachuse Fisharebest\Webtrees\I18N; 986661454SGreg Roachuse Fisharebest\Webtrees\Tree; 104c9729fbSGreg Roach 114c9729fbSGreg Roach/** 127c2c99faSGreg Roach * @var bool $can_register 134c9729fbSGreg Roach * @var string $error 147c2c99faSGreg Roach * @var Tree|null $tree 154c9729fbSGreg Roach * @var string $url 164c9729fbSGreg Roach * @var string $username 177c2c99faSGreg Roach * @var string $warning 187c2c99faSGreg Roach * @var string $welcome 194c9729fbSGreg Roach */ 204c9729fbSGreg Roach?> 21dd6b2bfcSGreg Roach 22dd6b2bfcSGreg Roach<h2 class="wt-page-title"> 23dd6b2bfcSGreg Roach <?= I18N::translate('Welcome to this genealogy website') ?> 24dd6b2bfcSGreg Roach</h2> 25dd6b2bfcSGreg Roach 26dd6b2bfcSGreg Roach<p> 27dd6b2bfcSGreg Roach <?= nl2br($welcome, false) ?> 28dd6b2bfcSGreg Roach</p> 29dd6b2bfcSGreg Roach 30*81bf3221SGreg Roach<form method="post" action="<?= e(route(LoginAction::class, ['tree' => $tree?->name()])) ?>" class="wt-page-options wt-page-options-login"> 31dd6b2bfcSGreg Roach <input type="hidden" name="url" value="<?= e($url) ?>"> 32dd6b2bfcSGreg Roach 339e3c2cf9SGreg Roach <div class="row"> 34dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="username"> 35dd6b2bfcSGreg Roach <?= I18N::translate('Username') ?> 36dd6b2bfcSGreg Roach </label> 37dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 387dca5265SGreg Roach <input class="form-control" type="text" id="username" name="username" required="required" value="<?= e($username) ?>" autocomplete="username"> 39dd6b2bfcSGreg Roach </div> 40dd6b2bfcSGreg Roach </div> 41dd6b2bfcSGreg Roach 429e3c2cf9SGreg Roach <div class="row mb-3"> 43dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="password"> 44dd6b2bfcSGreg Roach <?= I18N::translate('Password') ?> 45dd6b2bfcSGreg Roach </label> 46dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 47d4786c66SGreg Roach <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')) ?>"> 48dd6b2bfcSGreg Roach </div> 49dd6b2bfcSGreg Roach </div> 50dd6b2bfcSGreg Roach 519e3c2cf9SGreg Roach <div class="row"> 52dd6b2bfcSGreg Roach <div class="col-sm-3 col-form-label wt-page-options-label"> 53dd6b2bfcSGreg Roach </div> 54dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 55dd6b2bfcSGreg Roach <button class="btn btn-primary" type="submit"> 564c9729fbSGreg Roach <?= /* I18N: A button label. */ 574c9729fbSGreg Roach I18N::translate('sign in') ?> 58dd6b2bfcSGreg Roach </button> 594c9729fbSGreg Roach 60*81bf3221SGreg Roach <a class="btn btn-link" href="<?= e(route(PasswordRequestPage::class, ['tree' => $tree?->name()])) ?>"> 61dd6b2bfcSGreg Roach <?= I18N::translate('Forgot password?') ?> 62dd6b2bfcSGreg Roach </a> 63dd6b2bfcSGreg Roach 64dd6b2bfcSGreg Roach <?php if ($can_register) : ?> 65*81bf3221SGreg Roach <a class="btn btn-link" href="<?= e(route(RegisterPage::class, ['tree' => $tree?->name()])) ?>"> 66dd6b2bfcSGreg Roach <?= I18N::translate('Request a new user account') ?> 67dd6b2bfcSGreg Roach </a> 68dd6b2bfcSGreg Roach <?php endif ?> 69dd6b2bfcSGreg Roach </div> 70dd6b2bfcSGreg Roach </div> 7181443e3cSGreg Roach 7281443e3cSGreg Roach <?= csrf_field() ?> 73dd6b2bfcSGreg Roach</form> 74