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