xref: /webtrees/resources/views/report-setup-page.phtml (revision f810ce3bc040cea206588ff98f4dc3f3a19b42f0)
1d70512abSGreg Roach<?php
2d70512abSGreg Roach
3d70512abSGreg Roachuse Fisharebest\Webtrees\I18N;
4d70512abSGreg Roach
57f7be5ebSGreg Roach/**
67f7be5ebSGreg Roach * @var string               $title
77f7be5ebSGreg Roach * @var string               $description
87f7be5ebSGreg Roach * @var string               $destination
97f7be5ebSGreg Roach * @var string               $format
107f7be5ebSGreg Roach * @var array<array<string>> $inputs
117f7be5ebSGreg Roach * @var string               $format
127f7be5ebSGreg Roach */
137f7be5ebSGreg 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">
39*f810ce3bSGreg Roach                <?php if ($input['extra'] !== ''): ?>
40*f810ce3bSGreg Roach                    <div class="input-group">
41dd6b2bfcSGreg Roach                        <?= $input['control'] ?>
42dd6b2bfcSGreg Roach                        <?= $input['extra'] ?>
43dd6b2bfcSGreg Roach                    </div>
44*f810ce3bSGreg Roach                    <div id="caldivinput-<?= e($n) ?>" style="position:absolute;visibility:hidden;background-color:white;z-index:1000"></div>
45*f810ce3bSGreg Roach                <?php else: ?>
46*f810ce3bSGreg Roach                    <?= $input['control'] ?>
47*f810ce3bSGreg Roach                <?php endif ?>
48*f810ce3bSGreg Roach            </div>
49dd6b2bfcSGreg Roach        </div>
50dd6b2bfcSGreg Roach    <?php endforeach ?>
51dd6b2bfcSGreg Roach
52dd6b2bfcSGreg Roach    <div class="row form-group">
53dd6b2bfcSGreg Roach        <div class="col-sm-3 col-form-label wt-page-options-label">
541cfe16bdSGreg Roach            <?= I18N::translate('Format') ?>
55dd6b2bfcSGreg Roach        </div>
56dd6b2bfcSGreg Roach
57dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value d-flex justify-content-around">
58dd6b2bfcSGreg Roach            <div class="text-center">
591cfe16bdSGreg Roach                <label for="HTML" title="HTML">
601cfe16bdSGreg Roach                    <?= view('icons/mime', ['type' => 'text/html']) ?>
611cfe16bdSGreg Roach                    <span class="sr-only">HTML</span>
621cfe16bdSGreg Roach                </label>
63dd6b2bfcSGreg Roach                <br>
647f7be5ebSGreg Roach                <input type="radio" name="format" id="HTML" value="HTML" <?= $format === 'HTML' ? 'checked' : '' ?>>
65dd6b2bfcSGreg Roach            </div>
66dd6b2bfcSGreg Roach            <div class="text-center">
671cfe16bdSGreg Roach                <label for="PDF" title="PDF">
681cfe16bdSGreg Roach                    <?= view('icons/mime', ['type' => 'application/pdf']) ?>
691cfe16bdSGreg Roach                    <span class="sr-only">PDF</span>
701cfe16bdSGreg Roach                </label>
71dd6b2bfcSGreg Roach                <br>
727f7be5ebSGreg Roach                <input type="radio" name="format" value="PDF" id="PDF" <?= $format === 'PDF' ? 'checked' : '' ?>>
73dd6b2bfcSGreg Roach            </div>
74dd6b2bfcSGreg Roach        </div>
75dd6b2bfcSGreg Roach    </div>
76dd6b2bfcSGreg Roach
77dd6b2bfcSGreg Roach    <div class="row form-group">
78dd6b2bfcSGreg Roach        <div class="col-sm-3 col-form-label wt-page-options-label"></div>
79dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
807f7be5ebSGreg Roach            <?php if ($destination === 'download') : ?>
817f7be5ebSGreg Roach                <button type="submit" name="destination" value="download" class="btn btn-primary">
827f7be5ebSGreg Roach                    <?= view('icons/download') ?>
837f7be5ebSGreg Roach                    <?= I18N::translate('download') ?>
847f7be5ebSGreg Roach                </button>
857f7be5ebSGreg Roach                <button type="submit" name="destination" value="view" class="btn btn-secondary">
867f7be5ebSGreg Roach                    <?= view('icons/report') ?>
877f7be5ebSGreg Roach                    <?= I18N::translate('view') ?>
887f7be5ebSGreg Roach                </button>
897f7be5ebSGreg Roach            <?php else : ?>
901cfe16bdSGreg Roach                <button type="submit" name="destination" value="view" class="btn btn-primary">
911cfe16bdSGreg Roach                    <?= view('icons/report') ?>
921cfe16bdSGreg Roach                    <?= I18N::translate('view') ?>
931cfe16bdSGreg Roach                </button>
941cfe16bdSGreg Roach                <button type="submit" name="destination" value="download" class="btn btn-secondary">
951cfe16bdSGreg Roach                    <?= view('icons/download') ?>
961cfe16bdSGreg Roach                    <?= I18N::translate('download') ?>
97dd6b2bfcSGreg Roach                </button>
987f7be5ebSGreg Roach            <?php endif ?>
99dd6b2bfcSGreg Roach        </div>
100dd6b2bfcSGreg Roach    </div>
101dd6b2bfcSGreg Roach</form>
102