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