xref: /webtrees/resources/views/admin/data-fix-select.phtml (revision 5bfc689774bb9a6401271c4ed15a6d50652c991b)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\Http\RequestHandlers\DataFixSelect;
5use Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
6use Fisharebest\Webtrees\I18N;
7use Fisharebest\Webtrees\Module\ModuleDataFixInterface;
8use Fisharebest\Webtrees\Tree;
9use Illuminate\Support\Collection;
10
11/**
12 * @var Collection<int,ModuleDataFixInterface> $data_fixes
13 * @var string                                 $latest_version
14 * @var string                                 $title
15 * @var Tree                                   $tree
16 */
17
18?>
19
20<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
21
22<h1><?= $title ?></h1>
23
24<form method="post" action="<?= e(route(DataFixSelect::class, ['tree' => $tree->name()])) ?>">
25    <?= csrf_field() ?>
26
27    <div class="row form-group 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-control" 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 form-group 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</form>
55