xref: /webtrees/resources/views/setup/step-4-database-sqlite.phtml (revision 1a218474113038005e50986fff24ebcbd58554ff)
1<?php use Fisharebest\Webtrees\I18N;
2use Fisharebest\Webtrees\Webtrees; ?>
3
4<form method="post" autocomplete="off">
5    <input name="lang" type="hidden" value="<?= e($lang) ?>">
6    <input name="dbtype" type="hidden" value="<?= e($dbtype) ?>">
7    <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>">
8    <input name="dbport" type="hidden" value="<?= e($dbport) ?>">
9    <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>">
10    <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>">
11    <input name="wtname" type="hidden" value="<?= e($wtname) ?>">
12    <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>">
13    <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>">
14    <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>">
15
16    <h2>
17        <?= I18N::translate('Database connection') ?> – SQLite
18    </h2>
19
20    <?php foreach ($errors as $error) : ?>
21        <p class="alert alert-danger"><?= $error ?></p>
22    <?php endforeach ?>
23
24    <?php foreach ($warnings as $warning) : ?>
25        <p class="alert alert-warning"><?= $warning ?></p>
26    <?php endforeach ?>
27
28    <div class="row form-group">
29        <label class="col-form-label col-sm-3" for="dbname">
30            <?= I18N::translate('Database name') ?>
31        </label>
32
33        <div class="col-sm-9">
34            <div class="input-group" dir="ltr">
35                <div class="input-group-prepend">
36                    <span class="input-group-text"><?=e( realpath(Webtrees::ROOT_DIR)) ?>/data/</span>
37                </div>
38
39                <input class="form-control" id="dbname" name="dbname" pattern="[a-zA-Z0-9_]{1,63}" type="text" value="<?= e($dbname) ?>">
40
41                <div class="input-group-append">
42                    <span class="input-group-text">.sqlite</span>
43                </div>
44            </div>
45
46            <p class="small text-muted">
47                <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?>
48            </p>
49        </div>
50    </div>
51
52    <div class="row form-group">
53        <label class="col-form-label col-sm-3" for="tblpfx">
54            <?= I18N::translate('Table prefix') ?>
55        </label>
56
57        <div class="col-sm-9">
58            <input class="form-control" dir="ltr" id="tblpfx" maxlength="15" name="tblpfx" pattern="[a-zA-Z0-9_]+" type="text" value="<?= e($tblpfx) ?>">
59
60            <p class="small text-muted">
61                <?= 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.') ?>
62                <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?>
63            </p>
64        </div>
65    </div>
66
67    <hr>
68
69    <div class="d-flex justify-content-between">
70        <button class="btn btn-primary" name="step" type="submit" value="5">
71            <?= I18N::translate('next') ?>
72        </button>
73
74        <button class="btn btn-secondary" name="step" type="submit" value="3">
75            <?= I18N::translate('previous') ?>
76        </button>
77    </div>
78</form>
79