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