blob: 4fbab65fa09de0604ddf6e329417f57fc348934e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
<?php
declare(strict_types=1);
use Fisharebest\Webtrees\I18N;
/**
* @var string $title
* @var string $description
* @var string $destination
* @var string $format
* @var array<array<string>> $inputs
* @var string $format
*/
?>
<h2 class="wt-page-title">
<?= $title ?>
</h2>
<form method="post" class="wt-page-options wt-page-options-report-setup">
<div class="row">
<div class="col-sm-3 col-form-label wt-page-options-label">
<?= I18N::translate('Description') ?>
</div>
<div class="col-sm-9 wt-page-options-value">
<?= $description ?>
</div>
</div>
<?php foreach ($inputs as $n => $input) : ?>
<input type="hidden" name="varnames[]" value="<?= e($input['name']) ?>">
<div class="row">
<label class="col-sm-3 col-form-label wt-page-options-label" for="input-<?= $n ?>">
<?= I18N::translate($input['value']) ?>
</label>
<div class="col-sm-9 wt-page-options-value">
<?php if ($input['extra'] !== '') : ?>
<div class="input-group">
<?= $input['control'] ?>
<?= $input['extra'] ?>
</div>
<div id="caldivinput-<?= e($n) ?>" style="position:absolute;visibility:hidden;background-color:white;z-index:1000"></div>
<?php else : ?>
<?= $input['control'] ?>
<?php endif ?>
</div>
</div>
<?php endforeach ?>
<div class="row">
<div class="col-sm-3 col-form-label wt-page-options-label">
<?= I18N::translate('Format') ?>
</div>
<div class="col-sm-9 wt-page-options-value d-flex justify-content-around">
<div class="text-center">
<label for="HTML" title="HTML">
<?= view('icons/mime', ['type' => 'text/html']) ?>
<span class="visually-hidden">HTML</span>
</label>
<br>
<input type="radio" name="format" id="HTML" value="HTML" <?= $format === 'HTML' ? 'checked' : '' ?>>
</div>
<div class="text-center">
<label for="PDF" title="PDF">
<?= view('icons/mime', ['type' => 'application/pdf']) ?>
<span class="visually-hidden">PDF</span>
</label>
<br>
<input type="radio" name="format" value="PDF" id="PDF" <?= $format === 'PDF' ? 'checked' : '' ?>>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-3 col-form-label wt-page-options-label"></div>
<div class="col-sm-9 wt-page-options-value">
<?php if ($destination === 'download') : ?>
<button type="submit" name="destination" value="download" class="btn btn-primary">
<?= view('icons/download') ?>
<?= I18N::translate('download') ?>
</button>
<button type="submit" name="destination" value="view" class="btn btn-secondary">
<?= view('icons/report') ?>
<?= I18N::translate('view') ?>
</button>
<?php else : ?>
<button type="submit" name="destination" value="view" class="btn btn-primary">
<?= view('icons/report') ?>
<?= I18N::translate('view') ?>
</button>
<button type="submit" name="destination" value="download" class="btn btn-secondary">
<?= view('icons/download') ?>
<?= I18N::translate('download') ?>
</button>
<?php endif ?>
</div>
</div>
<?= csrf_field() ?>
</form>
|