xref: /webtrees/resources/views/modules/clippings/download.phtml (revision 81585c874c45034cf46a445fc8622728464b24a8)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4use Fisharebest\Webtrees\Tree;
5
6/**
7 * @var bool   $is_manager
8 * @var bool   $is_member
9 * @var string $module
10 * @var string $title
11 * @var Tree   $tree
12 */
13
14?>
15
16<h2 class="wt-page-title"><?= $title ?></h2>
17
18<form method="post" action="<?= e(route('module', ['module' => $module, 'action' => 'Download', 'tree' => $tree->name()])) ?>" class="wt-page-options wt-page-options-clippings-download hidden-print">
19    <?= csrf_field() ?>
20
21    <?php if ($is_manager) : ?>
22        <div class="row form-group mb-3">
23            <div class="col-sm-3 col-form-label wt-page-options-label">
24                <?= I18N::translate('Apply privacy settings') ?>
25            </div>
26            <div class="col-sm-9 wt-page-options-value">
27                <div class="form-check">
28                    <input class="form-check-input" type="radio" name="privatize_export" value="none" id="priv-none" checked>
29                    <label class="form-check-label" for="priv-none">
30                        <?= I18N::translate('None') ?>
31                    </label>
32                </div>
33                <div class="form-check">
34                    <input class="form-check-input" type="radio" name="privatize_export" value="gedadmin" id="priv-manager">
35                    <label class="form-check-label" for="priv-manager">
36                        <?= I18N::translate('Manager') ?>
37                    </label>
38                </div>
39                <div class="form-check">
40                    <input class="form-check-input" type="radio" name="privatize_export" value="user" id="priv-member">
41                    <label class="form-check-label" for="priv-member">
42                        <?= I18N::translate('Member') ?>
43                    </label>
44                </div>
45                <div class="form-check">
46                    <input class="form-check-input" type="radio" name="privatize_export" value="visitor" id="priv-visitor">
47                    <label class="form-check-label" for="priv-visitor">
48                        <?= I18N::translate('Visitor') ?>
49                    </label>
50                </div>
51            </div>
52        </div>
53    <?php elseif ($is_member) : ?>
54        <div class="row form-group mb-3">
55            <div class="col-sm-3 col-form-label wt-page-options-label">
56                <?= I18N::translate('Apply privacy settings') ?>
57            </div>
58            <div class="col-sm-9 wt-page-options-value">
59                <div class="form-check">
60                    <input class="form-check-input" type="radio" name="privatize_export" value="user" id="priv-member" checked>
61                    <label class="form-check-label" for="priv-member">
62                        <?= I18N::translate('Member') ?>
63                    </label>
64                </div>
65                <div class="form-check">
66                    <input class="form-check-input" type="radio" name="privatize_export" value="visitor" id="priv-visitor">
67                    <label class="form-check-label" for="priv-visitor">
68                        <?= I18N::translate('Visitor') ?>
69                    </label>
70                </div>
71            </div>
72        </div>
73    <?php else : ?>
74        <input type="hidden" name="privatize_export" value="visitor">
75    <?php endif ?>
76
77    <div class="row form-group mb-3">
78        <label class="col-sm-3 col-form-label wt-page-options-label" for="convert">
79            <?= I18N::translate('Convert from UTF-8 to ISO-8859-1') ?>
80        </label>
81        <div class="col-sm-9 wt-page-options-value">
82            <input type="checkbox" name="convert" id="convert">
83        </div>
84    </div>
85
86    <div class="row form-group mb-3">
87        <div class="col-sm-3 col-form-label wt-page-options-label">
88        </div>
89        <div class="col-sm-9 wt-page-options-value">
90            <button type="submit" class="btn btn-primary">
91                <?= view('icons/download') ?>
92                <?= I18N::translate('download') ?>
93            </button>
94            <a href="<?= e(route('module', ['module' => $module, 'action' => 'Show', 'tree' => $tree->name()])) ?>" class="btn btn-secondary">
95                <?= view('icons/cancel') ?>
96                <?= I18N::translate('cancel') ?>
97            </a>
98        </div>
99    </div>
100</form>
101