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