xref: /webtrees/resources/views/admin/data-fix-select.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
6use Fisharebest\Webtrees\Http\RequestHandlers\DataFixSelect;
7use Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
8use Fisharebest\Webtrees\I18N;
9use Fisharebest\Webtrees\Module\ModuleDataFixInterface;
10use Fisharebest\Webtrees\Tree;
11use Illuminate\Support\Collection;
12
13/**
14 * @var Collection<int,ModuleDataFixInterface> $data_fixes
15 * @var string                                 $latest_version
16 * @var string                                 $title
17 * @var Tree                                   $tree
18 */
19
20?>
21
22<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
23
24<h1><?= $title ?></h1>
25
26<form method="post" action="<?= e(route(DataFixSelect::class, ['tree' => $tree->name()])) ?>">
27    <div class="row mb-3">
28        <label class="col-sm-3 col-form-label" for="data_fix">
29            <?= I18N::translate('Data fix') ?>
30        </label>
31        <div class="col-sm-9">
32            <select class="form-select" id="data_fix" name="data_fix" type="text" required="required">
33                <option value=""><?= I18N::translate('&lt;select&gt;') ?></option>
34                <?php foreach ($data_fixes as $data_fix) : ?>
35                    <option value="<?= $data_fix->name() ?>">
36                        <?= $data_fix->title() ?>
37                    </option>
38                <?php endforeach ?>
39            </select>
40        </div>
41    </div>
42
43    <div class="row mb-3">
44        <div class="col-sm-3">
45        </div>
46
47        <div class="col-sm-9">
48            <button class="btn btn-primary" type="submit">
49                <?= view('icons/save') ?>
50                <?= I18N::translate('next') ?>
51            </button>
52        </div>
53    </div>
54
55    <?= csrf_field() ?>
56</form>
57