xref: /webtrees/resources/views/setup/step-4-database-pgsql.phtml (revision 982d76d1b4590434f05cfe991ff00da5ddb290de)
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 3306.') ?>
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">
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="^[^`]+$" type="text" value="<?= e($dbname) ?>">
78            <p class="small text-muted">
79                <?= I18N::translate('This is case sensitive. If a database with this name does not already exist webtrees will attempt to create one for you. Success will depend on permissions set for your web server, but you will be notified if this fails.') ?>
80            </p>
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" 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-secondary" name="step" type="submit" value="3">
101            <?= I18N::translate('previous') ?>
102        </button>
103
104        <button class="btn btn-primary" name="step" type="submit" value="5">
105            <?= I18N::translate('next') ?>
106        </button>
107    </div>
108</form>
109