xref: /webtrees/resources/views/setup/step-4-database-pgsql.phtml (revision 511800d3f227f16e409777e22044df6fb9a238a3)
1982d76d1SGreg Roach<?php use Fisharebest\Webtrees\I18N; ?>
2982d76d1SGreg Roach
3982d76d1SGreg Roach<form method="POST" autocomplete="off">
4982d76d1SGreg Roach    <input name="route" type="hidden" value="setup">
5982d76d1SGreg Roach    <input name="lang" type="hidden" value="<?= e($lang) ?>">
6982d76d1SGreg Roach    <input name="dbtype" type="hidden" value="<?= e($dbtype) ?>">
7982d76d1SGreg Roach    <input name="wtname" type="hidden" value="<?= e($wtname) ?>">
8982d76d1SGreg Roach    <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>">
9982d76d1SGreg Roach    <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>">
10982d76d1SGreg Roach    <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>">
11982d76d1SGreg Roach
12982d76d1SGreg Roach    <h2>
13982d76d1SGreg Roach        <?= I18N::translate('Database connection') ?> – PostgreSQL
14982d76d1SGreg Roach    </h2>
15982d76d1SGreg Roach
16982d76d1SGreg Roach    <?php foreach ($errors as $error) : ?>
17982d76d1SGreg Roach        <p class="alert alert-danger"><?= $error ?></p>
18982d76d1SGreg Roach    <?php endforeach ?>
19982d76d1SGreg Roach
20982d76d1SGreg Roach    <?php foreach ($warnings as $warning) : ?>
21982d76d1SGreg Roach        <p class="alert alert-warning"><?= $warning ?></p>
22982d76d1SGreg Roach    <?php endforeach ?>
23982d76d1SGreg Roach
24982d76d1SGreg Roach    <div class="row form-group">
25982d76d1SGreg Roach        <label class="col-form-label col-sm-3" for="dbhost">
26982d76d1SGreg Roach            <?= I18N::translate('Server name') ?>
27982d76d1SGreg Roach        </label>
28982d76d1SGreg Roach        <div class="col-sm-9">
29982d76d1SGreg Roach            <input class="form-control" id="dbhost" name="dbhost" type="text" value="<?= e($dbhost) ?>" dir="ltr">
30982d76d1SGreg Roach            <p class="small text-muted">
31982d76d1SGreg Roach                <?= I18N::translate('Most sites are configured to use localhost. This means that your database runs on the same computer as your web server.') ?>
32982d76d1SGreg Roach            </p>
33982d76d1SGreg Roach        </div>
34982d76d1SGreg Roach    </div>
35982d76d1SGreg Roach
36982d76d1SGreg Roach    <div class="row form-group">
37982d76d1SGreg Roach        <label class="col-form-label col-sm-3" for="dbport">
38982d76d1SGreg Roach            <?= I18N::translate('Port number') ?>
39982d76d1SGreg Roach        </label>
40982d76d1SGreg Roach        <div class="col-sm-9">
41982d76d1SGreg Roach            <input class="form-control" id="dbport" name="dbport" pattern="\d+" type="text" value="<?= e($dbport) ?>" dir="ltr">
42982d76d1SGreg Roach            <p class="small text-muted">
43*511800d3SGreg Roach                <?= I18N::translate('Most sites are configured to use the default value of 5432.') ?>
44982d76d1SGreg Roach            </p>
45982d76d1SGreg Roach        </div>
46982d76d1SGreg Roach    </div>
47982d76d1SGreg Roach
48982d76d1SGreg Roach    <div class="row form-group">
49982d76d1SGreg Roach        <label class="col-form-label col-sm-3" for="dbuser">
50982d76d1SGreg Roach            <?= I18N::translate('Database user account') ?>
51982d76d1SGreg Roach        </label>
52982d76d1SGreg Roach        <div class="col-sm-9">
53982d76d1SGreg Roach            <input class="form-control" id="dbuser" name="dbuser" type="text" value="<?= e($dbuser) ?>" dir="ltr">
54982d76d1SGreg Roach            <p class="small text-muted">
55982d76d1SGreg Roach                <?= I18N::translate('This is case sensitive.') ?>
56982d76d1SGreg Roach            </p>
57982d76d1SGreg Roach        </div>
58982d76d1SGreg Roach    </div>
59982d76d1SGreg Roach
60982d76d1SGreg Roach    <div class="row form-group">
61982d76d1SGreg Roach        <label class="col-form-label col-sm-3" for="dbpass">
62982d76d1SGreg Roach            <?= I18N::translate('Database password') ?>
63982d76d1SGreg Roach        </label>
64982d76d1SGreg Roach        <div class="col-sm-9">
65982d76d1SGreg Roach            <input class="form-control" id="dbpass" name="dbpass" type="password" value="<?= e($dbpass) ?>" dir="ltr">
66982d76d1SGreg Roach            <p class="small text-muted">
67982d76d1SGreg Roach                <?= I18N::translate('This is case sensitive.') ?>
68982d76d1SGreg Roach            </p>
69982d76d1SGreg Roach        </div>
70982d76d1SGreg Roach    </div>
71982d76d1SGreg Roach
72982d76d1SGreg Roach    <div class="row form-group">
73982d76d1SGreg Roach        <label class="col-form-label col-sm-3" for="dbname">
74982d76d1SGreg Roach            <?= I18N::translate('Database name') ?>
75982d76d1SGreg Roach        </label>
76982d76d1SGreg Roach        <div class="col-sm-9">
77982d76d1SGreg Roach            <input class="form-control" dir="ltr" id="dbname" name="dbname" pattern="^[^`]+$" type="text" value="<?= e($dbname) ?>">
78*511800d3SGreg Roach
79982d76d1SGreg Roach            <p class="small text-muted">
80*511800d3SGreg Roach                <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?>
81982d76d1SGreg Roach            </p>
82982d76d1SGreg Roach        </div>
83982d76d1SGreg Roach    </div>
84982d76d1SGreg Roach
85982d76d1SGreg Roach    <div class="row form-group">
86982d76d1SGreg Roach        <label class="col-form-label col-sm-3" for="tblpfx">
87982d76d1SGreg Roach            <?= I18N::translate('Table prefix') ?>
88982d76d1SGreg Roach        </label>
89982d76d1SGreg Roach        <div class="col-sm-9">
90982d76d1SGreg Roach            <input class="form-control" dir="ltr" id="tblpfx" name="tblpfx" pattern="^[^`]*$" type="text" value="<?= e($tblpfx) ?>">
91982d76d1SGreg Roach            <p class="small text-muted">
92982d76d1SGreg Roach                <?= 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.') ?>
93982d76d1SGreg Roach                <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?>
94982d76d1SGreg Roach            </p>
95982d76d1SGreg Roach        </div>
96982d76d1SGreg Roach    </div>
97982d76d1SGreg Roach
98982d76d1SGreg Roach    <hr>
99982d76d1SGreg Roach
100982d76d1SGreg Roach    <div class="d-flex justify-content-between">
101982d76d1SGreg Roach        <button class="btn btn-secondary" name="step" type="submit" value="3">
102982d76d1SGreg Roach            <?= I18N::translate('previous') ?>
103982d76d1SGreg Roach        </button>
104982d76d1SGreg Roach
105982d76d1SGreg Roach        <button class="btn btn-primary" name="step" type="submit" value="5">
106982d76d1SGreg Roach            <?= I18N::translate('next') ?>
107982d76d1SGreg Roach        </button>
108982d76d1SGreg Roach    </div>
109982d76d1SGreg Roach</form>
110