1d70512abSGreg Roach<?php 2d70512abSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 5d70512abSGreg Roachuse Fisharebest\Webtrees\I18N; 6dc270d8cSGreg Roachuse Illuminate\Support\Collection; 7dc270d8cSGreg Roach 8dc270d8cSGreg Roach/** 9dc270d8cSGreg Roach * @var string $dbhost 10dc270d8cSGreg Roach * @var string $dbname 11dc270d8cSGreg Roach * @var string $dbpass 12dc270d8cSGreg Roach * @var string $dbport 13dc270d8cSGreg Roach * @var string $dbtype 14dc270d8cSGreg Roach * @var string $dbuser 1536779af1SGreg Roach * @var Collection<int,string> $errors 16dc270d8cSGreg Roach * @var string $lang 17dc270d8cSGreg Roach * @var string $tblpfx 1836779af1SGreg Roach * @var Collection<int,string> $warnings 19dc270d8cSGreg Roach * @var string $wtemail 20dc270d8cSGreg Roach * @var string $wtname 21dc270d8cSGreg Roach * @var string $wtpass 22dc270d8cSGreg Roach * @var string $wtuser 23dc270d8cSGreg Roach */ 24d70512abSGreg Roach 25d70512abSGreg Roach?> 26982d76d1SGreg Roach 2783615acfSGreg Roach<form method="post" autocomplete="off"> 28982d76d1SGreg Roach <input name="lang" type="hidden" value="<?= e($lang) ?>"> 29982d76d1SGreg Roach <input name="dbtype" type="hidden" value="<?= e($dbtype) ?>"> 30982d76d1SGreg Roach <input name="wtname" type="hidden" value="<?= e($wtname) ?>"> 31982d76d1SGreg Roach <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>"> 32982d76d1SGreg Roach <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>"> 33982d76d1SGreg Roach <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>"> 34982d76d1SGreg Roach 35982d76d1SGreg Roach <h2> 36982d76d1SGreg Roach <?= I18N::translate('Database connection') ?> – PostgreSQL 37982d76d1SGreg Roach </h2> 38982d76d1SGreg Roach 39982d76d1SGreg Roach <?php foreach ($errors as $error) : ?> 40982d76d1SGreg Roach <p class="alert alert-danger"><?= $error ?></p> 41982d76d1SGreg Roach <?php endforeach ?> 42982d76d1SGreg Roach 43982d76d1SGreg Roach <?php foreach ($warnings as $warning) : ?> 44982d76d1SGreg Roach <p class="alert alert-warning"><?= $warning ?></p> 45982d76d1SGreg Roach <?php endforeach ?> 46982d76d1SGreg Roach 479e3c2cf9SGreg Roach <div class="row mb-3"> 48982d76d1SGreg Roach <label class="col-form-label col-sm-3" for="dbhost"> 49982d76d1SGreg Roach <?= I18N::translate('Server name') ?> 50982d76d1SGreg Roach </label> 51982d76d1SGreg Roach <div class="col-sm-9"> 52982d76d1SGreg Roach <input class="form-control" id="dbhost" name="dbhost" type="text" value="<?= e($dbhost) ?>" dir="ltr"> 53315eb316SGreg Roach <div class="form-text"> 54982d76d1SGreg Roach <?= I18N::translate('Most sites are configured to use localhost. This means that your database runs on the same computer as your web server.') ?> 55315eb316SGreg Roach </div> 56982d76d1SGreg Roach </div> 57982d76d1SGreg Roach </div> 58982d76d1SGreg Roach 599e3c2cf9SGreg Roach <div class="row mb-3"> 60982d76d1SGreg Roach <label class="col-form-label col-sm-3" for="dbport"> 61982d76d1SGreg Roach <?= I18N::translate('Port number') ?> 62982d76d1SGreg Roach </label> 63982d76d1SGreg Roach <div class="col-sm-9"> 64982d76d1SGreg Roach <input class="form-control" id="dbport" name="dbport" pattern="\d+" type="text" value="<?= e($dbport) ?>" dir="ltr"> 65315eb316SGreg Roach <div class="form-text"> 66511800d3SGreg Roach <?= I18N::translate('Most sites are configured to use the default value of 5432.') ?> 67315eb316SGreg Roach </div> 68982d76d1SGreg Roach </div> 69982d76d1SGreg Roach </div> 70982d76d1SGreg Roach 719e3c2cf9SGreg Roach <div class="row mb-3"> 72982d76d1SGreg Roach <label class="col-form-label col-sm-3" for="dbuser"> 73982d76d1SGreg Roach <?= I18N::translate('Database user account') ?> 74982d76d1SGreg Roach </label> 75982d76d1SGreg Roach <div class="col-sm-9"> 76982d76d1SGreg Roach <input class="form-control" id="dbuser" name="dbuser" type="text" value="<?= e($dbuser) ?>" dir="ltr"> 77982d76d1SGreg Roach </div> 78982d76d1SGreg Roach </div> 79982d76d1SGreg Roach 809e3c2cf9SGreg Roach <div class="row mb-3"> 81982d76d1SGreg Roach <label class="col-form-label col-sm-3" for="dbpass"> 82982d76d1SGreg Roach <?= I18N::translate('Database password') ?> 83982d76d1SGreg Roach </label> 84982d76d1SGreg Roach <div class="col-sm-9"> 85d4786c66SGreg 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')) ?>"> 86982d76d1SGreg Roach </div> 87982d76d1SGreg Roach </div> 88982d76d1SGreg Roach 899e3c2cf9SGreg Roach <div class="row mb-3"> 90982d76d1SGreg Roach <label class="col-form-label col-sm-3" for="dbname"> 91982d76d1SGreg Roach <?= I18N::translate('Database name') ?> 92982d76d1SGreg Roach </label> 93982d76d1SGreg Roach <div class="col-sm-9"> 947bf2ba3bSGreg Roach <input class="form-control" dir="ltr" id="dbname" name="dbname" pattern="[^`'"]{1,63}" type="text" value="<?= e($dbname) ?>"> 95982d76d1SGreg Roach </div> 96982d76d1SGreg Roach </div> 97982d76d1SGreg Roach 989e3c2cf9SGreg Roach <div class="row mb-3"> 99982d76d1SGreg Roach <label class="col-form-label col-sm-3" for="tblpfx"> 100982d76d1SGreg Roach <?= I18N::translate('Table prefix') ?> 101982d76d1SGreg Roach </label> 102982d76d1SGreg Roach <div class="col-sm-9"> 1036633baf0SGreg Roach <input class="form-control" dir="ltr" id="tblpfx" maxlength="15" name="tblpfx" pattern="[a-zA-Z0-9_]+" type="text" value="<?= e($tblpfx) ?>"> 104315eb316SGreg Roach <div class="form-text"> 105982d76d1SGreg 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.') ?> 106982d76d1SGreg Roach <?= I18N::translate('Use letters A-Z, a-z, digits 0-9, or underscores') ?> 107315eb316SGreg Roach </div> 108982d76d1SGreg Roach </div> 109982d76d1SGreg Roach </div> 110982d76d1SGreg Roach 111982d76d1SGreg Roach <hr> 112982d76d1SGreg Roach 113982d76d1SGreg Roach <div class="d-flex justify-content-between"> 114982d76d1SGreg Roach <button class="btn btn-primary" name="step" type="submit" value="5"> 115982d76d1SGreg Roach <?= I18N::translate('next') ?> 116982d76d1SGreg Roach </button> 1173e0eba26SGreg Roach 1183e0eba26SGreg Roach <button class="btn btn-secondary" name="step" type="submit" value="3"> 1193e0eba26SGreg Roach <?= I18N::translate('previous') ?> 1203e0eba26SGreg Roach </button> 121982d76d1SGreg Roach </div> 122982d76d1SGreg Roach</form> 123