xref: /webtrees/resources/views/setup/step-5-administrator.phtml (revision 889e1c77e9b998b1b62772151b4fb4fed3911a32)
1d70512abSGreg Roach<?php
2d70512abSGreg Roach
310e06497SGreg Roachdeclare(strict_types=1);
410e06497SGreg Roach
5d70512abSGreg Roachuse Fisharebest\Webtrees\I18N;
6dc270d8cSGreg Roachuse Illuminate\Support\Collection;
7dc270d8cSGreg Roach
8dc270d8cSGreg Roach/**
9dc270d8cSGreg Roach * @var string                 $dbhost
10dc270d8cSGreg Roach * @var string                 $dbname
11dc270d8cSGreg Roach * @var string                 $dbpass
12dc270d8cSGreg Roach * @var string                 $dbport
13dc270d8cSGreg Roach * @var string                 $dbtype
14dc270d8cSGreg Roach * @var string                 $dbuser
1536779af1SGreg Roach * @var Collection<int,string> $errors
16dc270d8cSGreg Roach * @var string                 $lang
17dc270d8cSGreg Roach * @var string                 $tblpfx
1836779af1SGreg Roach * @var Collection<int,string> $warnings
19dc270d8cSGreg Roach * @var string                 $wtemail
20dc270d8cSGreg Roach * @var string                 $wtname
21dc270d8cSGreg Roach * @var string                 $wtpass
22dc270d8cSGreg Roach * @var string                 $wtuser
23dc270d8cSGreg Roach */
24d70512abSGreg Roach
25d70512abSGreg Roach?>
26dd6b2bfcSGreg Roach
2783615acfSGreg Roach<form method="post" autocomplete="off">
28dd6b2bfcSGreg Roach    <input name="lang" type="hidden" value="<?= e($lang) ?>">
29982d76d1SGreg Roach    <input name="dbtype" type="hidden" value="<?= e($dbtype) ?>">
30dd6b2bfcSGreg Roach    <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>">
31dd6b2bfcSGreg Roach    <input name="dbport" type="hidden" value="<?= e($dbport) ?>">
32dd6b2bfcSGreg Roach    <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>">
33dd6b2bfcSGreg Roach    <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>">
34dd6b2bfcSGreg Roach    <input name="dbname" type="hidden" value="<?= e($dbname) ?>">
35dd6b2bfcSGreg Roach    <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>">
36673fcaccSGreg Roach    <input name="baseurl" type="hidden" value="">
37dd6b2bfcSGreg Roach
38982d76d1SGreg Roach    <h2>
39982d76d1SGreg Roach        <?= I18N::translate('Administrator account') ?>
40982d76d1SGreg Roach    </h2>
41982d76d1SGreg Roach
42982d76d1SGreg Roach    <?php foreach ($errors as $error) : ?>
43982d76d1SGreg Roach        <p class="alert alert-danger"><?= $error ?></p>
44982d76d1SGreg Roach    <?php endforeach ?>
45982d76d1SGreg Roach
46982d76d1SGreg Roach    <?php foreach ($warnings as $warning) : ?>
47982d76d1SGreg Roach        <p class="alert alert-warning"><?= $warning ?></p>
48982d76d1SGreg Roach    <?php endforeach ?>
49dd6b2bfcSGreg Roach
50dd6b2bfcSGreg Roach    <p>
51dd6b2bfcSGreg Roach        <?= I18N::translate('You need to set up an administrator account. This account can control all aspects of this webtrees installation. Please choose a strong password.') ?>
52dd6b2bfcSGreg Roach    </p>
53dd6b2bfcSGreg Roach
549e3c2cf9SGreg Roach    <div class="row mb-3">
55dd6b2bfcSGreg Roach        <label class="col-form-label col-sm-3" for="wtname">
56dd6b2bfcSGreg Roach            <?= I18N::translate('Your name') ?>
57dd6b2bfcSGreg Roach        </label>
58dd6b2bfcSGreg Roach        <div class="col-sm-9">
591f1ffa65SGreg Roach            <input class="form-control" dir="ltr" id="wtname" name="wtname" type="text" value="<?= e($wtname) ?>" autocomplete="name">
60315eb316SGreg Roach            <div class="form-text">
61dd6b2bfcSGreg Roach                <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?>
62315eb316SGreg Roach            </div>
63dd6b2bfcSGreg Roach        </div>
64dd6b2bfcSGreg Roach    </div>
65dd6b2bfcSGreg Roach
669e3c2cf9SGreg Roach    <div class="row mb-3">
67dd6b2bfcSGreg Roach        <label class="col-form-label col-sm-3" for="wtuser">
68dd6b2bfcSGreg Roach            <?= I18N::translate('Username') ?>
69dd6b2bfcSGreg Roach        </label>
70dd6b2bfcSGreg Roach        <div class="col-sm-9">
711f1ffa65SGreg Roach            <input class="form-control" dir="ltr" id="wtuser" name="wtuser" type="text" value="<?= e($wtuser) ?>" autocomplete="username">
72315eb316SGreg Roach            <div class="form-text">
73dd6b2bfcSGreg Roach                <?= I18N::translate('You will use this to sign in to webtrees.') ?>
74315eb316SGreg Roach            </div>
75dd6b2bfcSGreg Roach        </div>
76dd6b2bfcSGreg Roach    </div>
77dd6b2bfcSGreg Roach
789e3c2cf9SGreg Roach    <div class="row mb-3">
79dd6b2bfcSGreg Roach        <label class="col-form-label col-sm-3" for="wtpass">
80dd6b2bfcSGreg Roach            <?= I18N::translate('Password') ?>
81dd6b2bfcSGreg Roach        </label>
82dd6b2bfcSGreg Roach        <div class="col-sm-9">
83d4786c66SGreg Roach            <input class="form-control" dir="ltr" id="wtpass" name="wtpass" pattern=".{6,}" type="password" value="<?= e($wtpass) ?>" 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')) ?>">
84315eb316SGreg Roach            <div class="form-text">
85dd6b2bfcSGreg Roach                <?= I18N::translate('This must be at least six characters long. It is case-sensitive.') ?>
86315eb316SGreg Roach            </div>
87dd6b2bfcSGreg Roach        </div>
88dd6b2bfcSGreg Roach    </div>
89dd6b2bfcSGreg Roach
909e3c2cf9SGreg Roach    <div class="row mb-3">
91dd6b2bfcSGreg Roach        <label class="col-form-label col-sm-3" for="wtemail">
92dd6b2bfcSGreg Roach            <?= I18N::translate('Email address') ?>
93dd6b2bfcSGreg Roach        </label>
94dd6b2bfcSGreg Roach        <div class="col-sm-9">
951f1ffa65SGreg Roach            <input class="form-control" dir="ltr" id="wtemail" name="wtemail" type="email" value="<?= e($wtemail) ?>" autocomplete="email">
96315eb316SGreg Roach            <div class="form-text">
97dd6b2bfcSGreg Roach                <?= I18N::translate('This email address will be used to send password reminders, website notifications, and messages from other family members who are registered on the website.') ?>
98315eb316SGreg Roach            </div>
99dd6b2bfcSGreg Roach        </div>
100dd6b2bfcSGreg Roach    </div>
101dd6b2bfcSGreg Roach
102dd6b2bfcSGreg Roach    <hr>
103dd6b2bfcSGreg Roach
104982d76d1SGreg Roach    <div class="d-flex justify-content-between">
105dd6b2bfcSGreg Roach        <button class="btn btn-primary" name="step" type="submit" value="6">
106dd6b2bfcSGreg Roach            <?= I18N::translate('next') ?>
107dd6b2bfcSGreg Roach        </button>
1083e0eba26SGreg Roach
1093e0eba26SGreg Roach        <button class="btn btn-secondary" name="step" type="submit" value="4">
1103e0eba26SGreg Roach            <?= I18N::translate('previous') ?>
1113e0eba26SGreg Roach        </button>
112982d76d1SGreg Roach    </div>
113dd6b2bfcSGreg Roach</form>
114673fcaccSGreg Roach
115673fcaccSGreg Roach<script>
116*889e1c77SGreg Roach  document.querySelector('input[name=baseurl]').value = decodeURI(location.href.split(/\?|#|index\.php/)[0].replace(/\/+$/, ''));
117673fcaccSGreg Roach</script>
118