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