xref: /webtrees/resources/views/setup/step-4-database-sqlite.phtml (revision 3e0eba269bca585f7d56f2be0f87364fa134cc42)
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="dbhost" type="hidden" value="<?= e($dbhost) ?>">
8982d76d1SGreg Roach    <input name="dbport" type="hidden" value="<?= e($dbport) ?>">
9982d76d1SGreg Roach    <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>">
10982d76d1SGreg Roach    <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>">
11982d76d1SGreg Roach    <input name="wtname" type="hidden" value="<?= e($wtname) ?>">
12982d76d1SGreg Roach    <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>">
13982d76d1SGreg Roach    <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>">
14982d76d1SGreg Roach    <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>">
15982d76d1SGreg Roach
16982d76d1SGreg Roach    <h2>
17982d76d1SGreg Roach        <?= I18N::translate('Database connection') ?> – SQLite
18982d76d1SGreg Roach    </h2>
19982d76d1SGreg Roach
20982d76d1SGreg Roach    <?php foreach ($errors as $error) : ?>
21982d76d1SGreg Roach        <p class="alert alert-danger"><?= $error ?></p>
22982d76d1SGreg Roach    <?php endforeach ?>
23982d76d1SGreg Roach
24982d76d1SGreg Roach    <?php foreach ($warnings as $warning) : ?>
25982d76d1SGreg Roach        <p class="alert alert-warning"><?= $warning ?></p>
26982d76d1SGreg Roach    <?php endforeach ?>
27982d76d1SGreg Roach
28982d76d1SGreg Roach    <div class="row form-group">
29982d76d1SGreg Roach        <label class="col-form-label col-sm-3" for="dbname">
30982d76d1SGreg Roach            <?= I18N::translate('Database name') ?>
31982d76d1SGreg Roach        </label>
32982d76d1SGreg Roach
33982d76d1SGreg Roach        <div class="col-sm-9">
34982d76d1SGreg Roach            <div class="input-group" dir="ltr">
35982d76d1SGreg Roach                <div class="input-group-prepend">
36982d76d1SGreg Roach                    <span class="input-group-text"><?=e( WT_ROOT) ?>data/</span>
37982d76d1SGreg Roach                </div>
38982d76d1SGreg Roach
39982d76d1SGreg Roach                <input class="form-control" id="dbname" name="dbname" pattern="[a-zA-Z0-9_]+" type="text" value="<?= e($dbname) ?>">
40982d76d1SGreg Roach
41982d76d1SGreg Roach                <div class="input-group-append">
42982d76d1SGreg Roach                    <span class="input-group-text">.sqlite</span>
43982d76d1SGreg Roach                </div>
44982d76d1SGreg Roach            </div>
45982d76d1SGreg Roach
46982d76d1SGreg Roach            <p class="small text-muted">
47982d76d1SGreg Roach                <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?>
48982d76d1SGreg Roach            </p>
49982d76d1SGreg Roach        </div>
50982d76d1SGreg Roach    </div>
51982d76d1SGreg Roach
52982d76d1SGreg Roach    <div class="row form-group">
53982d76d1SGreg Roach        <label class="col-form-label col-sm-3" for="tblpfx">
54982d76d1SGreg Roach            <?= I18N::translate('Table prefix') ?>
55982d76d1SGreg Roach        </label>
56982d76d1SGreg Roach
57982d76d1SGreg Roach        <div class="col-sm-9">
58982d76d1SGreg Roach            <input class="form-control" dir="ltr" id="tblpfx" name="tblpfx" pattern="[a-zA-Z0-9_]+" type="text" value="<?= e($tblpfx) ?>">
59982d76d1SGreg Roach
60982d76d1SGreg Roach            <p class="small text-muted">
61982d76d1SGreg 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.') ?>
62982d76d1SGreg Roach                <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?>
63982d76d1SGreg Roach            </p>
64982d76d1SGreg Roach        </div>
65982d76d1SGreg Roach    </div>
66982d76d1SGreg Roach
67982d76d1SGreg Roach    <hr>
68982d76d1SGreg Roach
69982d76d1SGreg Roach    <div class="d-flex justify-content-between">
70982d76d1SGreg Roach        <button class="btn btn-primary" name="step" type="submit" value="5">
71982d76d1SGreg Roach            <?= I18N::translate('next') ?>
72982d76d1SGreg Roach        </button>
73*3e0eba26SGreg Roach
74*3e0eba26SGreg Roach        <button class="btn btn-secondary" name="step" type="submit" value="3">
75*3e0eba26SGreg Roach            <?= I18N::translate('previous') ?>
76*3e0eba26SGreg Roach        </button>
77982d76d1SGreg Roach    </div>
78982d76d1SGreg Roach</form>
79