xref: /webtrees/resources/views/report-setup-page.phtml (revision 7f7be5ebddc34c2c0789769121d48fa5de6606c5)
1d70512abSGreg Roach<?php
2d70512abSGreg Roach
3d70512abSGreg Roachuse Fisharebest\Webtrees\I18N;
4d70512abSGreg Roach
5*7f7be5ebSGreg Roach/**
6*7f7be5ebSGreg Roach * @var string               $title
7*7f7be5ebSGreg Roach * @var string               $description
8*7f7be5ebSGreg Roach * @var string               $destination
9*7f7be5ebSGreg Roach * @var string               $format
10*7f7be5ebSGreg Roach * @var array<array<string>> $inputs
11*7f7be5ebSGreg Roach * @var string               $format
12*7f7be5ebSGreg Roach */
13*7f7be5ebSGreg Roach
14d70512abSGreg Roach?>
15dd6b2bfcSGreg Roach
16dd6b2bfcSGreg Roach<h2 class="wt-page-title">
17dd6b2bfcSGreg Roach    <?= $title ?>
18dd6b2bfcSGreg Roach</h2>
19dd6b2bfcSGreg Roach
201cfe16bdSGreg Roach<form method="post" class="wt-page-options wt-page-options-report-setup">
211cfe16bdSGreg Roach    <?= csrf_field() ?>
22dd6b2bfcSGreg Roach
23dd6b2bfcSGreg Roach    <div class="row form-group">
24dd6b2bfcSGreg Roach        <div class="col-sm-3 col-form-label wt-page-options-label">
25dd6b2bfcSGreg Roach            <?= I18N::translate('Description') ?>
26dd6b2bfcSGreg Roach        </div>
27dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
28dd6b2bfcSGreg Roach            <?= $description ?>
29dd6b2bfcSGreg Roach        </div>
30dd6b2bfcSGreg Roach    </div>
31dd6b2bfcSGreg Roach
32dd6b2bfcSGreg Roach    <?php foreach ($inputs as $n => $input) : ?>
33dd6b2bfcSGreg Roach        <input type="hidden" name="varnames[]" value="<?= e($input['name']) ?>">
34dd6b2bfcSGreg Roach        <div class="row form-group">
35dd6b2bfcSGreg Roach            <label class="col-sm-3 col-form-label wt-page-options-label" for="input-<?= $n ?>">
36dd6b2bfcSGreg Roach                <?= I18N::translate($input['value']) ?>
37dd6b2bfcSGreg Roach            </label>
38dd6b2bfcSGreg Roach            <div class="col-sm-9 wt-page-options-value">
39dd6b2bfcSGreg Roach                <?= $input['control'] ?>
40dd6b2bfcSGreg Roach                <?= $input['extra'] ?>
41dd6b2bfcSGreg Roach            </div>
42dd6b2bfcSGreg Roach        </div>
43dd6b2bfcSGreg Roach    <?php endforeach ?>
44dd6b2bfcSGreg Roach
45dd6b2bfcSGreg Roach    <div class="row form-group">
46dd6b2bfcSGreg Roach        <div class="col-sm-3 col-form-label wt-page-options-label">
471cfe16bdSGreg Roach            <?= I18N::translate('Format') ?>
48dd6b2bfcSGreg Roach        </div>
49dd6b2bfcSGreg Roach
50dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value d-flex justify-content-around">
51dd6b2bfcSGreg Roach            <div class="text-center">
521cfe16bdSGreg Roach                <label for="HTML" title="HTML">
531cfe16bdSGreg Roach                    <?= view('icons/mime', ['type' => 'text/html']) ?>
541cfe16bdSGreg Roach                    <span class="sr-only">HTML</span>
551cfe16bdSGreg Roach                </label>
56dd6b2bfcSGreg Roach                <br>
57*7f7be5ebSGreg Roach                <input type="radio" name="format" id="HTML" value="HTML" <?= $format === 'HTML' ? 'checked' : '' ?>>
58dd6b2bfcSGreg Roach            </div>
59dd6b2bfcSGreg Roach            <div class="text-center">
601cfe16bdSGreg Roach                <label for="PDF" title="PDF">
611cfe16bdSGreg Roach                    <?= view('icons/mime', ['type' => 'application/pdf']) ?>
621cfe16bdSGreg Roach                    <span class="sr-only">PDF</span>
631cfe16bdSGreg Roach                </label>
64dd6b2bfcSGreg Roach                <br>
65*7f7be5ebSGreg Roach                <input type="radio" name="format" value="PDF" id="PDF" <?= $format === 'PDF' ? 'checked' : '' ?>>
66dd6b2bfcSGreg Roach            </div>
67dd6b2bfcSGreg Roach        </div>
68dd6b2bfcSGreg Roach    </div>
69dd6b2bfcSGreg Roach
70dd6b2bfcSGreg Roach    <div class="row form-group">
71dd6b2bfcSGreg Roach        <div class="col-sm-3 col-form-label wt-page-options-label"></div>
72dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
73*7f7be5ebSGreg Roach            <?php if ($destination === 'download') : ?>
74*7f7be5ebSGreg Roach                <button type="submit" name="destination" value="download" class="btn btn-primary">
75*7f7be5ebSGreg Roach                    <?= view('icons/download') ?>
76*7f7be5ebSGreg Roach                    <?= I18N::translate('download') ?>
77*7f7be5ebSGreg Roach                </button>
78*7f7be5ebSGreg Roach                <button type="submit" name="destination" value="view" class="btn btn-secondary">
79*7f7be5ebSGreg Roach                    <?= view('icons/report') ?>
80*7f7be5ebSGreg Roach                    <?= I18N::translate('view') ?>
81*7f7be5ebSGreg Roach                </button>
82*7f7be5ebSGreg Roach            <?php else : ?>
831cfe16bdSGreg Roach                <button type="submit" name="destination" value="view" class="btn btn-primary">
841cfe16bdSGreg Roach                    <?= view('icons/report') ?>
851cfe16bdSGreg Roach                    <?= I18N::translate('view') ?>
861cfe16bdSGreg Roach                </button>
871cfe16bdSGreg Roach                <button type="submit" name="destination" value="download" class="btn btn-secondary">
881cfe16bdSGreg Roach                    <?= view('icons/download') ?>
891cfe16bdSGreg Roach                    <?= I18N::translate('download') ?>
90dd6b2bfcSGreg Roach                </button>
91*7f7be5ebSGreg Roach            <?php endif ?>
92dd6b2bfcSGreg Roach        </div>
93dd6b2bfcSGreg Roach    </div>
94dd6b2bfcSGreg Roach</form>
95