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