xref: /webtrees/resources/views/setup/step-4-database-sqlite.phtml (revision 83615acfc72bfb50678c6481f2a00bab04041a87)
1f397d0fdSGreg Roach<?php use Fisharebest\Webtrees\I18N;
2f397d0fdSGreg Roachuse Fisharebest\Webtrees\Webtrees; ?>
3982d76d1SGreg Roach
4*83615acfSGreg Roach<form method="post" autocomplete="off">
5982d76d1SGreg Roach    <input name="route" type="hidden" value="setup">
6982d76d1SGreg Roach    <input name="lang" type="hidden" value="<?= e($lang) ?>">
7982d76d1SGreg Roach    <input name="dbtype" type="hidden" value="<?= e($dbtype) ?>">
8982d76d1SGreg Roach    <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>">
9982d76d1SGreg Roach    <input name="dbport" type="hidden" value="<?= e($dbport) ?>">
10982d76d1SGreg Roach    <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>">
11982d76d1SGreg Roach    <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>">
12982d76d1SGreg Roach    <input name="wtname" type="hidden" value="<?= e($wtname) ?>">
13982d76d1SGreg Roach    <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>">
14982d76d1SGreg Roach    <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>">
15982d76d1SGreg Roach    <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>">
16982d76d1SGreg Roach
17982d76d1SGreg Roach    <h2>
18982d76d1SGreg Roach        <?= I18N::translate('Database connection') ?> – SQLite
19982d76d1SGreg Roach    </h2>
20982d76d1SGreg Roach
21982d76d1SGreg Roach    <?php foreach ($errors as $error) : ?>
22982d76d1SGreg Roach        <p class="alert alert-danger"><?= $error ?></p>
23982d76d1SGreg Roach    <?php endforeach ?>
24982d76d1SGreg Roach
25982d76d1SGreg Roach    <?php foreach ($warnings as $warning) : ?>
26982d76d1SGreg Roach        <p class="alert alert-warning"><?= $warning ?></p>
27982d76d1SGreg Roach    <?php endforeach ?>
28982d76d1SGreg Roach
29982d76d1SGreg Roach    <div class="row form-group">
30982d76d1SGreg Roach        <label class="col-form-label col-sm-3" for="dbname">
31982d76d1SGreg Roach            <?= I18N::translate('Database name') ?>
32982d76d1SGreg Roach        </label>
33982d76d1SGreg Roach
34982d76d1SGreg Roach        <div class="col-sm-9">
35982d76d1SGreg Roach            <div class="input-group" dir="ltr">
36982d76d1SGreg Roach                <div class="input-group-prepend">
374325a1f9SGreg Roach                    <span class="input-group-text"><?=e( realpath(Webtrees::ROOT_DIR)) ?>/data/</span>
38982d76d1SGreg Roach                </div>
39982d76d1SGreg Roach
407bf2ba3bSGreg Roach                <input class="form-control" id="dbname" name="dbname" pattern="[a-zA-Z0-9_]{1,63}" type="text" value="<?= e($dbname) ?>">
41982d76d1SGreg Roach
42982d76d1SGreg Roach                <div class="input-group-append">
43982d76d1SGreg Roach                    <span class="input-group-text">.sqlite</span>
44982d76d1SGreg Roach                </div>
45982d76d1SGreg Roach            </div>
46982d76d1SGreg Roach
47982d76d1SGreg Roach            <p class="small text-muted">
48982d76d1SGreg Roach                <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?>
49982d76d1SGreg Roach            </p>
50982d76d1SGreg Roach        </div>
51982d76d1SGreg Roach    </div>
52982d76d1SGreg Roach
53982d76d1SGreg Roach    <div class="row form-group">
54982d76d1SGreg Roach        <label class="col-form-label col-sm-3" for="tblpfx">
55982d76d1SGreg Roach            <?= I18N::translate('Table prefix') ?>
56982d76d1SGreg Roach        </label>
57982d76d1SGreg Roach
58982d76d1SGreg Roach        <div class="col-sm-9">
5909331e47SGreg Roach            <input class="form-control" dir="ltr" id="tblpfx" maxlength="15" name="tblpfx" pattern="[a-zA-Z0-9_]+" type="text" value="<?= e($tblpfx) ?>">
60982d76d1SGreg Roach
61982d76d1SGreg Roach            <p class="small text-muted">
62982d76d1SGreg 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.') ?>
63982d76d1SGreg Roach                <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?>
64982d76d1SGreg Roach            </p>
65982d76d1SGreg Roach        </div>
66982d76d1SGreg Roach    </div>
67982d76d1SGreg Roach
68982d76d1SGreg Roach    <hr>
69982d76d1SGreg Roach
70982d76d1SGreg Roach    <div class="d-flex justify-content-between">
71982d76d1SGreg Roach        <button class="btn btn-primary" name="step" type="submit" value="5">
72982d76d1SGreg Roach            <?= I18N::translate('next') ?>
73982d76d1SGreg Roach        </button>
743e0eba26SGreg Roach
753e0eba26SGreg Roach        <button class="btn btn-secondary" name="step" type="submit" value="3">
763e0eba26SGreg Roach            <?= I18N::translate('previous') ?>
773e0eba26SGreg Roach        </button>
78982d76d1SGreg Roach    </div>
79982d76d1SGreg Roach</form>
80