xref: /webtrees/resources/views/setup/step-5-administrator.phtml (revision b56fa9dd6a5e9075de5337fd34748412e9e559a7)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4
5?>
6
7<form method="post" autocomplete="off">
8    <input name="lang" type="hidden" value="<?= e($lang) ?>">
9    <input name="dbtype" type="hidden" value="<?= e($dbtype) ?>">
10    <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>">
11    <input name="dbport" type="hidden" value="<?= e($dbport) ?>">
12    <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>">
13    <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>">
14    <input name="dbname" type="hidden" value="<?= e($dbname) ?>">
15    <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>">
16    <input name="baseurl" type="hidden" value="">
17
18    <h2>
19        <?= I18N::translate('Administrator account') ?>
20    </h2>
21
22    <?php foreach ($errors as $error) : ?>
23        <p class="alert alert-danger"><?= $error ?></p>
24    <?php endforeach ?>
25
26    <?php foreach ($warnings as $warning) : ?>
27        <p class="alert alert-warning"><?= $warning ?></p>
28    <?php endforeach ?>
29
30    <p>
31        <?= 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.') ?>
32    </p>
33
34    <div class="row form-group">
35        <label class="col-form-label col-sm-3" for="wtname">
36            <?= I18N::translate('Your name') ?>
37        </label>
38        <div class="col-sm-9">
39            <input class="form-control" dir="ltr" id="wtname" name="wtname" type="text" value="<?= e($wtname) ?>" autocomplete="name">
40            <p class="small text-muted">
41                <?= I18N::translate('This is your real name, as you would like it displayed on screen.') ?>
42            </p>
43        </div>
44    </div>
45
46    <div class="row form-group">
47        <label class="col-form-label col-sm-3" for="wtuser">
48            <?= I18N::translate('Username') ?>
49        </label>
50        <div class="col-sm-9">
51            <input class="form-control" dir="ltr" id="wtuser" name="wtuser" type="text" value="<?= e($wtuser) ?>" autocomplete="username">
52            <p class="small text-muted">
53                <?= I18N::translate('You will use this to sign in to webtrees.') ?>
54            </p>
55        </div>
56    </div>
57
58    <div class="row form-group">
59        <label class="col-form-label col-sm-3" for="wtpass">
60            <?= I18N::translate('Password') ?>
61        </label>
62        <div class="col-sm-9">
63            <input class="form-control" dir="ltr" id="wtpass" name="wtpass" pattern=".{6,}" type="password" value="<?= e($wtpass) ?>" autocomplete="current-password">
64            <p class="small text-muted">
65                <?= I18N::translate('This must be at least six characters long. It is case-sensitive.') ?>
66            </p>
67        </div>
68    </div>
69
70    <div class="row form-group">
71        <label class="col-form-label col-sm-3" for="wtemail">
72            <?= I18N::translate('Email address') ?>
73        </label>
74        <div class="col-sm-9">
75            <input class="form-control" dir="ltr" id="wtemail" name="wtemail" type="email" value="<?= e($wtemail) ?>" autocomplete="email">
76            <p class="small text-muted">
77                <?= 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.') ?>
78            </p>
79        </div>
80    </div>
81
82    <hr>
83
84    <div class="d-flex justify-content-between">
85        <button class="btn btn-primary" name="step" type="submit" value="6">
86            <?= I18N::translate('next') ?>
87        </button>
88
89        <button class="btn btn-secondary" name="step" type="submit" value="4">
90            <?= I18N::translate('previous') ?>
91        </button>
92    </div>
93</form>
94
95<script>
96  document.querySelector('input[name=baseurl]').value = decodeURI(location.href.split('index.php')[0].replace(/\/+$/, ''));
97</script>
98