xref: /webtrees/resources/views/setup/step-4-database-pgsql.phtml (revision f567c3d8c682bc271cb765480294cb4273f7632a)
1<?php use Fisharebest\Webtrees\I18N; ?>
2
3<form method="post" autocomplete="off">
4    <input name="lang" type="hidden" value="<?= e($lang) ?>">
5    <input name="dbtype" type="hidden" value="<?= e($dbtype) ?>">
6    <input name="wtname" type="hidden" value="<?= e($wtname) ?>">
7    <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>">
8    <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>">
9    <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>">
10
11    <h2>
12        <?= I18N::translate('Database connection') ?> – PostgreSQL
13    </h2>
14
15    <?php foreach ($errors as $error) : ?>
16        <p class="alert alert-danger"><?= $error ?></p>
17    <?php endforeach ?>
18
19    <?php foreach ($warnings as $warning) : ?>
20        <p class="alert alert-warning"><?= $warning ?></p>
21    <?php endforeach ?>
22
23    <div class="row form-group">
24        <label class="col-form-label col-sm-3" for="dbhost">
25            <?= I18N::translate('Server name') ?>
26        </label>
27        <div class="col-sm-9">
28            <input class="form-control" id="dbhost" name="dbhost" type="text" value="<?= e($dbhost) ?>" dir="ltr">
29            <p class="small text-muted">
30                <?= I18N::translate('Most sites are configured to use localhost. This means that your database runs on the same computer as your web server.') ?>
31            </p>
32        </div>
33    </div>
34
35    <div class="row form-group">
36        <label class="col-form-label col-sm-3" for="dbport">
37            <?= I18N::translate('Port number') ?>
38        </label>
39        <div class="col-sm-9">
40            <input class="form-control" id="dbport" name="dbport" pattern="\d+" type="text" value="<?= e($dbport) ?>" dir="ltr">
41            <p class="small text-muted">
42                <?= I18N::translate('Most sites are configured to use the default value of 5432.') ?>
43            </p>
44        </div>
45    </div>
46
47    <div class="row form-group">
48        <label class="col-form-label col-sm-3" for="dbuser">
49            <?= I18N::translate('Database user account') ?>
50        </label>
51        <div class="col-sm-9">
52            <input class="form-control" id="dbuser" name="dbuser" type="text" value="<?= e($dbuser) ?>" dir="ltr">
53            <p class="small text-muted">
54                <?= I18N::translate('This is case sensitive.') ?>
55            </p>
56        </div>
57    </div>
58
59    <div class="row form-group">
60        <label class="col-form-label col-sm-3" for="dbpass">
61            <?= I18N::translate('Database password') ?>
62        </label>
63        <div class="col-sm-9">
64            <input class="form-control" id="dbpass" name="dbpass" type="password" value="<?= e($dbpass) ?>" dir="ltr" autocomplete="off">
65            <p class="small text-muted">
66                <?= I18N::translate('This is case sensitive.') ?>
67            </p>
68        </div>
69    </div>
70
71    <div class="row form-group">
72        <label class="col-form-label col-sm-3" for="dbname">
73            <?= I18N::translate('Database name') ?>
74        </label>
75        <div class="col-sm-9">
76            <input class="form-control" dir="ltr" id="dbname" name="dbname" pattern="[^`'&quot;]{1,63}" type="text" value="<?= e($dbname) ?>">
77        </div>
78    </div>
79
80    <div class="row form-group">
81        <label class="col-form-label col-sm-3" for="tblpfx">
82            <?= I18N::translate('Table prefix') ?>
83        </label>
84        <div class="col-sm-9">
85            <input class="form-control" dir="ltr" id="tblpfx" name="tblpfx" maxlength="15" pattern="^[^`]*$" type="text" value="<?= e($tblpfx) ?>">
86            <p class="small text-muted">
87                <?= I18N::translate('The prefix is optional, but recommended. By giving the table names a unique prefix you can let several different applications share the same database.') ?>
88                <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?>
89            </p>
90        </div>
91    </div>
92
93    <hr>
94
95    <div class="d-flex justify-content-between">
96        <button class="btn btn-primary" name="step" type="submit" value="5">
97            <?= I18N::translate('next') ?>
98        </button>
99
100        <button class="btn btn-secondary" name="step" type="submit" value="3">
101            <?= I18N::translate('previous') ?>
102        </button>
103    </div>
104</form>
105