xref: /webtrees/resources/views/setup/step-3-database-type.phtml (revision b11cdcd45131b1585d66693fab363cfeb18c51a4)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6use Illuminate\Support\Collection;
7
8/**
9 * @var string                 $dbhost
10 * @var string                 $dbname
11 * @var string                 $dbpass
12 * @var string                 $dbport
13 * @var string                 $dbtype
14 * @var string                 $dbuser
15 * @var Collection<int,string> $errors
16 * @var string                 $lang
17 * @var string                 $tblpfx
18 * @var Collection<int,string> $warnings
19 * @var string                 $wtemail
20 * @var string                 $wtname
21 * @var string                 $wtpass
22 * @var string                 $wtuser
23 */
24
25?>
26
27<form method="post" autocomplete="off">
28    <input name="lang" type="hidden" value="<?= e($lang) ?>">
29    <input name="dbname" type="hidden" value="<?= e($dbname) ?>">
30    <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>">
31    <input name="wtname" type="hidden" value="<?= e($wtname) ?>">
32    <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>">
33    <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>">
34    <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>">
35
36    <h2>
37        <?= I18N::translate('Connection to database server') ?>
38    </h2>
39
40    <?php foreach ($errors as $error) : ?>
41        <p class="alert alert-danger"><?= $error ?></p>
42    <?php endforeach ?>
43
44    <?php foreach ($warnings as $warning) : ?>
45        <p class="alert alert-warning"><?= $warning ?></p>
46    <?php endforeach ?>
47
48    <p>
49        <?= I18N::translate('webtrees needs a database to store your genealogy data.') ?>
50    </p>
51
52    <div class="row mb-3">
53        <label class="col-form-label col-sm-3" for="dbhost">
54            <?= I18N::translate('Database type') ?>
55        </label>
56        <div class="col-sm-9">
57            <div class="form-check">
58                <input class="form-check-input" type="radio" name="dbtype" id="dbtype-mysql" value="mysql" <?= $dbtype === 'mysql' ? 'checked' : '' ?>>
59                <label class="form-check-label" for="dbtype-mysql">
60                    MySQL
61                </label>
62            </div>
63
64            <div class="form-check">
65                <input class="form-check-input" type="radio" name="dbtype" id="dbtype-sqlite" value="sqlite" <?= $dbtype === 'sqlite' ? 'checked' : '' ?>>
66                <label class="form-check-label" for="dbtype-sqlite">
67                    SQLite
68                </label>
69            </div>
70
71            <div class="form-check">
72                <input class="form-check-input" type="radio" name="dbtype" id="dbtype-pgsql" value="pgsql" <?= $dbtype === 'pgsql' ? 'checked' : '' ?>>
73                <label class="form-check-label" for="dbtype-pgsql">
74                    PostgreSQL
75                </label>
76            </div>
77
78            <div class="form-check">
79                <input class="form-check-input" type="radio" name="dbtype" id="dbtype-sqlsrv" value="sqlsrv" <?= $dbtype === 'sqlsrv' ? 'checked' : '' ?>>
80                <label class="form-check-label" for="dbtype-sqlsrv">
81                    SQL Server
82                </label>
83            </div>
84
85            <div class="form-text">
86            </div>
87        </div>
88    </div>
89
90
91    <hr>
92
93    <div class="d-flex justify-content-between">
94        <button class="btn btn-primary" name="step" type="submit" value="4">
95            <?= I18N::translate('next') ?>
96        </button>
97
98        <button class="btn btn-secondary" name="step" type="submit" value="2">
99            <?= I18N::translate('previous') ?>
100        </button>
101    </div>
102</form>
103