xref: /webtrees/resources/views/report-select-page.phtml (revision 45ebc6c6221f90468111ed2015b8449dca331d93)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6use Fisharebest\Webtrees\Module\ModuleReportInterface;
7use Illuminate\Support\Collection;
8
9/**
10 * @var Collection<int,ModuleReportInterface> $reports
11 * @var string                                $title
12 */
13
14?>
15
16<h2 class="wt-page-title">
17    <?= $title ?>
18</h2>
19
20<form method="post" class="wt-page-options wt-page-options-report-select">
21    <div class="row">
22        <label class="col-sm-3 col-form-label wt-page-options-label" for="report">
23            <?= I18N::translate('Report') ?>
24        </label>
25        <div class="col-sm-9 wt-page-options-value">
26            <select class="form-select" id="report" name="report">
27                <?php foreach ($reports as $report) : ?>
28                    <option value="<?= e($report->name()) ?>">
29                        <?= e($report->title()) ?>
30                    </option>
31                <?php endforeach ?>
32            </select>
33        </div>
34    </div>
35
36    <div class="row">
37        <div class="col-sm-3 col-form-label wt-page-options-label"></div>
38        <div class="col-sm-9 wt-page-options-value">
39            <button type="submit" class="btn btn-primary">
40                <?= I18N::translate('continue') ?>
41            </button>
42        </div>
43    </div>
44
45    <?= csrf_field() ?>
46</form>
47