xref: /webtrees/resources/views/setup/step-4-database-sqlsrv.phtml (revision f24a8589f7d8400d503c5bb64be9ca10e1637659)
1*7a468185SGreg Roach<?php
2*7a468185SGreg Roach
3*7a468185SGreg Roachdeclare(strict_types=1);
4*7a468185SGreg Roach
5*7a468185SGreg Roachuse Fisharebest\Webtrees\I18N;
6*7a468185SGreg Roachuse Illuminate\Support\Collection;
7*7a468185SGreg Roach
8*7a468185SGreg Roach/**
9*7a468185SGreg Roach * @var string                 $dbhost
10*7a468185SGreg Roach * @var string                 $dbname
11*7a468185SGreg Roach * @var string                 $dbpass
12*7a468185SGreg Roach * @var string                 $dbport
13*7a468185SGreg Roach * @var string                 $dbtype
14*7a468185SGreg Roach * @var string                 $dbuser
15*7a468185SGreg Roach * @var Collection<int,string> $errors
16*7a468185SGreg Roach * @var string                 $lang
17*7a468185SGreg Roach * @var string                 $tblpfx
18*7a468185SGreg Roach * @var Collection<int,string> $warnings
19*7a468185SGreg Roach * @var string                 $wtemail
20*7a468185SGreg Roach * @var string                 $wtname
21*7a468185SGreg Roach * @var string                 $wtpass
22*7a468185SGreg Roach * @var string                 $wtuser
23*7a468185SGreg Roach */
24*7a468185SGreg Roach
25*7a468185SGreg Roach?>
26*7a468185SGreg Roach
27*7a468185SGreg Roach<form method="post" autocomplete="off">
28*7a468185SGreg Roach    <input name="lang" type="hidden" value="<?= e($lang) ?>">
29*7a468185SGreg Roach    <input name="dbtype" type="hidden" value="<?= e($dbtype) ?>">
30*7a468185SGreg Roach    <input name="wtname" type="hidden" value="<?= e($wtname) ?>">
31*7a468185SGreg Roach    <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>">
32*7a468185SGreg Roach    <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>">
33*7a468185SGreg Roach    <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>">
34*7a468185SGreg Roach
35*7a468185SGreg Roach    <h2>
36*7a468185SGreg Roach        <?= I18N::translate('Database connection') ?> – SQL Server
37*7a468185SGreg Roach    </h2>
38*7a468185SGreg Roach
39*7a468185SGreg Roach    <?php foreach ($errors as $error) : ?>
40*7a468185SGreg Roach        <p class="alert alert-danger"><?= $error ?></p>
41*7a468185SGreg Roach    <?php endforeach ?>
42*7a468185SGreg Roach
43*7a468185SGreg Roach    <?php foreach ($warnings as $warning) : ?>
44*7a468185SGreg Roach        <p class="alert alert-warning"><?= $warning ?></p>
45*7a468185SGreg Roach    <?php endforeach ?>
46*7a468185SGreg Roach
47*7a468185SGreg Roach    <div class="row mb-3">
48*7a468185SGreg Roach        <label class="col-form-label col-sm-3" for="dbhost">
49*7a468185SGreg Roach            <?= I18N::translate('Server name') ?>
50*7a468185SGreg Roach        </label>
51*7a468185SGreg Roach        <div class="col-sm-9">
52*7a468185SGreg Roach            <input class="form-control" id="dbhost" name="dbhost" type="text" value="<?= e($dbhost) ?>" dir="ltr">
53*7a468185SGreg Roach            <div class="form-text">
54*7a468185SGreg Roach                <?= I18N::translate('Most sites are configured to use localhost. This means that your database runs on the same computer as your web server.') ?>
55*7a468185SGreg Roach            </div>
56*7a468185SGreg Roach        </div>
57*7a468185SGreg Roach    </div>
58*7a468185SGreg Roach
59*7a468185SGreg Roach    <div class="row mb-3">
60*7a468185SGreg Roach        <label class="col-form-label col-sm-3" for="dbport">
61*7a468185SGreg Roach            <?= I18N::translate('Port number') ?>
62*7a468185SGreg Roach        </label>
63*7a468185SGreg Roach        <div class="col-sm-9">
64*7a468185SGreg Roach            <input class="form-control" id="dbport" name="dbport" pattern="\d+" type="text" value="<?= e($dbport) ?>" dir="ltr">
65*7a468185SGreg Roach            <div class="form-text">
66*7a468185SGreg Roach                <?= I18N::translate('Most sites are configured to use the default value of 1433.') ?>
67*7a468185SGreg Roach            </div>
68*7a468185SGreg Roach        </div>
69*7a468185SGreg Roach    </div>
70*7a468185SGreg Roach
71*7a468185SGreg Roach    <div class="row mb-3">
72*7a468185SGreg Roach        <label class="col-form-label col-sm-3" for="dbuser">
73*7a468185SGreg Roach            <?= I18N::translate('Database user account') ?>
74*7a468185SGreg Roach        </label>
75*7a468185SGreg Roach        <div class="col-sm-9">
76*7a468185SGreg Roach            <input class="form-control" id="dbuser" name="dbuser" type="text" value="<?= e($dbuser) ?>" dir="ltr">
77*7a468185SGreg Roach        </div>
78*7a468185SGreg Roach    </div>
79*7a468185SGreg Roach
80*7a468185SGreg Roach    <div class="row mb-3">
81*7a468185SGreg Roach        <label class="col-form-label col-sm-3" for="dbpass">
82*7a468185SGreg Roach            <?= I18N::translate('Database password') ?>
83*7a468185SGreg Roach        </label>
84*7a468185SGreg Roach        <div class="col-sm-9">
85*7a468185SGreg Roach            <input class="form-control" id="dbpass" name="dbpass" type="password" value="<?= e($dbpass) ?>" dir="ltr" autocomplete="off" data-wt-show-password-text="<?= e(I18N::translate('show')) ?>" data-wt-show-password-title="<?= e(I18N::translate('Show password')) ?>" data-wt-hide-password-text="<?= e(I18N::translate('hide')) ?>" data-wt-hide-password-title="<?= e(I18N::translate('Hide password')) ?>">
86*7a468185SGreg Roach        </div>
87*7a468185SGreg Roach    </div>
88*7a468185SGreg Roach
89*7a468185SGreg Roach    <div class="row mb-3">
90*7a468185SGreg Roach        <label class="col-form-label col-sm-3" for="dbname">
91*7a468185SGreg Roach            <?= I18N::translate('Database name') ?>
92*7a468185SGreg Roach        </label>
93*7a468185SGreg Roach        <div class="col-sm-9">
94*7a468185SGreg Roach            <input class="form-control" dir="ltr" id="dbname" name="dbname" pattern="[^`'&quot;]{1,128}" type="text" value="<?= e($dbname) ?>">
95*7a468185SGreg Roach        </div>
96*7a468185SGreg Roach    </div>
97*7a468185SGreg Roach
98*7a468185SGreg Roach    <div class="row mb-3">
99*7a468185SGreg Roach        <label class="col-form-label col-sm-3" for="tblpfx">
100*7a468185SGreg Roach            <?= I18N::translate('Table prefix') ?>
101*7a468185SGreg Roach        </label>
102*7a468185SGreg Roach        <div class="col-sm-9">
103*7a468185SGreg Roach            <input class="form-control" dir="ltr" id="tblpfx" maxlength="15"  name="tblpfx" pattern="[a-zA-Z0-9_]+" type="text" value="<?= e($tblpfx) ?>">
104*7a468185SGreg Roach            <div class="form-text">
105*7a468185SGreg 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.') ?>
106*7a468185SGreg Roach                <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?>
107*7a468185SGreg Roach            </div>
108*7a468185SGreg Roach        </div>
109*7a468185SGreg Roach    </div>
110*7a468185SGreg Roach
111*7a468185SGreg Roach    <hr>
112*7a468185SGreg Roach
113*7a468185SGreg Roach    <div class="d-flex justify-content-between">
114*7a468185SGreg Roach        <button class="btn btn-primary" name="step" type="submit" value="5">
115*7a468185SGreg Roach            <?= I18N::translate('next') ?>
116*7a468185SGreg Roach        </button>
117*7a468185SGreg Roach
118*7a468185SGreg Roach        <button class="btn btn-secondary" name="step" type="submit" value="3">
119*7a468185SGreg Roach            <?= I18N::translate('previous') ?>
120*7a468185SGreg Roach        </button>
121*7a468185SGreg Roach    </div>
122*7a468185SGreg Roach</form>
123