xref: /webtrees/resources/views/admin/trees-preferences.phtml (revision 658d845d07e0794c8d831d3e14f379769edbd1b4)
1<?php
2
3use Fisharebest\Webtrees\Auth;
4use Fisharebest\Webtrees\Contracts\UserInterface;
5use Fisharebest\Webtrees\Date;
6use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
7use Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
8use Fisharebest\Webtrees\Http\RequestHandlers\TreePreferencesAction;
9use Fisharebest\Webtrees\I18N;
10use Fisharebest\Webtrees\Individual;
11use Fisharebest\Webtrees\Tree;
12use Illuminate\Support\Collection;
13
14/**
15 * @var array<string,string>      $all_family_facts
16 * @var array<string,string>      $all_individual_facts
17 * @var array<string,string>      $all_surname_traditions
18 * @var array<int,string>         $calendar_formats
19 * @var string                    $data_folder
20 * @var array<int,string>         $formats
21 * @var Date                      $french_calendar_end
22 * @var Date                      $french_calendar_start
23 * @var Date                      $gregorian_calendar_start
24 * @var Collection<UserInterface> $members
25 * @var Individual|null           $pedigree_individual
26 * @var array<int,string>         $privacy_options
27 * @var array<int,string>         $relatives_events
28 * @var array<int,string>         $source_types
29 * @var array<string,string>      $surname_list_styles
30 * @var string                    $title
31 * @var Tree                      $tree
32 * @var int                       $tree_count
33 */
34
35?>
36
37<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
38
39<h1><?= $title ?></h1>
40
41<form method="post" action="<?= e(route(TreePreferencesAction::class, ['tree' => $tree->name()])) ?>" class="form-horizontal">
42    <?= csrf_field() ?>
43
44    <h2><?= I18N::translate('General') ?></h2>
45
46    <!-- TREE TITLE -->
47    <div class="row form-group">
48        <label class="col-sm-3 col-form-label" for="title">
49            <?= I18N::translate('Family tree title') ?>
50        </label>
51        <div class="col-sm-9">
52            <input
53                class="form-control"
54                dir="auto"
55                id="title"
56                maxlength="255"
57                name="title"
58                required
59                type="text"
60                value="<?= e($tree->getPreference('title')) ?>"
61            >
62        </div>
63    </div>
64
65    <!-- TREE URL / FILENAME -->
66    <?php if (Auth::isAdmin()) : ?>
67        <div class="row form-group">
68            <label class="col-sm-3 col-form-label" for="gedcom">
69                <?= I18N::translate('URL') ?>
70            </label>
71            <div class="col-sm-9">
72                <div class="input-group" dir="ltr">
73                    <span class="input-group-text" dir="ltr">
74                        <?= e(explode('{tree}', rawurldecode(route('example')))[0]) ?>
75                    </span>
76
77                    <input class="form-control" dir="ltr" id="gedcom" maxlength="255" name="gedcom" required="required" type="text" value="<?= e($tree->name()) ?>">
78
79                    <span class="input-group-text" dir="ltr">
80                        <?= e(explode('{tree}', rawurldecode(route('example')))[1]) ?>
81                    </span>
82                </div>
83
84                <div class="form-text">
85                    <?= /* I18N: help text for family tree / GEDCOM file names */ I18N::translate('Avoid spaces and punctuation. A family name might be a good choice.') ?>
86                </div>
87            </div>
88        </div>
89    <?php endif ?>
90
91    <!-- PEDIGREE_ROOT_ID -->
92    <div class="row form-group">
93        <label class="col-sm-3 col-form-label" for="PEDIGREE_ROOT_ID">
94            <?= /* I18N: A configuration setting */ I18N::translate('Default individual') ?>
95        </label>
96        <div class="col-sm-9">
97            <?= view('components/select-individual', ['name' => 'PEDIGREE_ROOT_ID', 'individual' => $pedigree_individual, 'tree' => $tree]) ?>
98            <div class="form-text">
99                <?= /* I18N: Help text for the “Default individual” configuration setting */ I18N::translate('This individual will be selected by default when viewing charts and reports.') ?>
100            </div>
101        </div>
102    </div>
103
104    <!-- CALENDAR_FORMAT -->
105    <fieldset class="row form-group">
106        <legend class="col-form-label col-sm-3">
107            <?= /* I18N: A configuration setting */ I18N::translate('Calendar conversion') ?>
108            <label class="visually-hidden" for="CALENDAR_FORMAT0">
109                <?= /* I18N: A configuration setting */ I18N::translate('Calendar conversion') ?> 1
110            </label>
111            <label class="visually-hidden" for="CALENDAR_FORMAT1">
112                <?= /* I18N: A configuration setting */ I18N::translate('Calendar conversion') ?> 2
113            </label>
114        </legend>
115        <div class="col-sm-9">
116            <div class="row">
117                <div class="col-sm-6">
118                    <?= view('components/select', ['name' => 'CALENDAR_FORMAT0', 'selected' => $calendar_formats[0], 'options' => ['none' => I18N::translate('No calendar conversion')] + Date::calendarNames()]) ?>
119                </div>
120                <div class="col-sm-6">
121                    <?= view('components/select', ['name' => 'CALENDAR_FORMAT1', 'selected' => $calendar_formats[1], 'options' => ['none' => I18N::translate('No calendar conversion')] + Date::calendarNames()]) ?>
122                </div>
123            </div>
124            <div class="form-text">
125                <?= /* I18N: Help text for the “Calendar conversion” configuration setting */ I18N::translate('Different calendar systems are used in different parts of the world, and many other calendar systems have been used in the past. Where possible, you should enter dates using the calendar in which the event was originally recorded. You can then specify a conversion, to show these dates in a more familiar calendar. If you regularly use two calendars, you can specify two conversions and dates will be converted to both the selected calendars.') ?>
126            </div>
127            <div class="form-text">
128                <?= /* I18N: Help text for the “Calendar conversion” configuration setting */ I18N::translate('Dates are only converted if they are valid for the calendar. For example, only dates between %1$s and %2$s will be converted to the French calendar and only dates after %3$s will be converted to the Gregorian calendar.', $french_calendar_start->display(false, null, false), $french_calendar_end->display(false, null, false), $gregorian_calendar_start->display(false, null, false)) ?>
129            </div>
130            <div class="form-text">
131                <?= /* I18N: Help text for the “Calendar conversion” configuration setting */ I18N::translate('In some calendars, days start at midnight. In other calendars, days start at sunset. The conversion process does not take account of the time, so for any event that occurs between sunset and midnight, the conversion between these types of calendar will be one day out.') ?>
132            </div>
133        </div>
134    </fieldset>
135
136    <!-- GENERATE_UIDS -->
137    <fieldset class="row form-group">
138        <legend class="col-form-label col-sm-3">
139            <?= /* I18N: A configuration setting */ I18N::translate('Add unique identifiers') ?>
140        </legend>
141        <div class="col-sm-9">
142            <?= view('components/radios-inline', ['name' => 'GENERATE_UIDS', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('GENERATE_UIDS')]) ?>
143            <div class="form-text">
144                <?= /* I18N: Help text for the “Add unique identifiers” configuration setting */ I18N::translate('Unique identifiers allow the same record to be found in different family trees and in different systems. They will be added whenever records are created or updated. If you do not want unique identifiers to be displayed, you can hide them using the privacy rules.') ?>
145            </div>
146        </div>
147    </fieldset>
148
149    <h2><?= I18N::translate('Contact information') ?></h2>
150
151    <!-- CONTACT_USER_ID -->
152    <div class="row form-group">
153        <label class="col-sm-3 col-form-label" for="CONTACT_USER_ID">
154            <?= /* I18N: A configuration setting */ I18N::translate('Genealogy contact') ?>
155        </label>
156        <div class="col-sm-9">
157            <select id="CONTACT_USER_ID" name="CONTACT_USER_ID" class="form-control">
158                <option value="">&nbsp;</option>
159                <?php foreach ($members as $member) : ?>
160                    <option value="<?= $member->id() ?>" <?= (int) $tree->getPreference('CONTACT_USER_ID') === $member->id() ? 'selected' : '' ?>>
161                        <?= e($member->realName()) ?> - <?= e($member->userName()) ?>
162                    </option>
163                <?php endforeach ?>
164            </select>
165            <div class="form-text">
166                <?= /* I18N: Help text for the “Genealogy contact” configuration setting */ I18N::translate('The individual to contact about the genealogy data on this website.') ?>
167            </div>
168        </div>
169    </div>
170
171    <!-- WEBMASTER_USER_ID -->
172    <div class="row form-group">
173        <label class="col-sm-3 col-form-label" for="WEBMASTER_USER_ID">
174            <?= /* I18N: A configuration setting */ I18N::translate('Technical help contact') ?>
175        </label>
176        <div class="col-sm-9">
177            <select id="WEBMASTER_USER_ID" name="WEBMASTER_USER_ID" class="form-control">
178                <option value="">&nbsp;</option>
179                <?php foreach ($members as $member) : ?>
180                    <option value="<?= $member->id() ?>" <?= (int) $tree->getPreference('WEBMASTER_USER_ID') === $member->id() ? 'selected' : '' ?>>
181                        <?= e($member->realName()) ?> - <?= e($member->userName()) ?>
182                    </option>
183                <?php endforeach ?>
184            </select>
185            <div class="form-text">
186                <?= /* I18N: Help text for the “Technical help contact” configuration setting */ I18N::translate('The individual to be contacted about technical questions or errors encountered on your website.') ?>
187            </div>
188        </div>
189    </div>
190
191    <h2><?= I18N::translate('Website') ?></h2>
192
193    <!-- META_TITLE -->
194    <div class="row form-group">
195        <label class="col-sm-3 col-form-label" for="META_TITLE">
196            <?= /* I18N: A configuration setting */ I18N::translate('Add to TITLE header tag') ?>
197        </label>
198        <div class="col-sm-9">
199            <input
200                class="form-control"
201                id="META_TITLE"
202                maxlength="255"
203                name="META_TITLE"
204                type="text"
205                value="<?= e($tree->getPreference('META_TITLE')) ?>"
206            >
207            <div class="form-text">
208                <?= /* I18N: Help text for the “Add to TITLE header tag” configuration setting */ I18N::translate('This text will be appended to each page title. It will be shown in the browser’s title bar, bookmarks, etc.') ?>
209            </div>
210        </div>
211    </div>
212
213    <!-- META_DESCRIPTION -->
214    <div class="row form-group">
215        <label class="col-sm-3 col-form-label" for="META_DESCRIPTION">
216            <?= /* I18N: A configuration setting */ I18N::translate('Description META tag') ?>
217        </label>
218        <div class="col-sm-9">
219            <input
220                class="form-control"
221                id="META_DESCRIPTION"
222                maxlength="255"
223                name="META_DESCRIPTION"
224                type="text"
225                value="<?= e($tree->getPreference('META_DESCRIPTION')) ?>"
226            >
227            <div class="form-text">
228                <?= /* I18N: Help text for the “Description META tag” configuration setting */ I18N::translate('Search engines may use this description of your site in their search results.') ?>
229            </div>
230        </div>
231    </div>
232
233    <?php if (Auth::isAdmin()) : ?>
234        <h2><?= I18N::translate('Media folders') ?></h2>
235
236        <!-- MEDIA_DIRECTORY -->
237        <div class="row form-group">
238            <label class="col-sm-3 col-form-label" for="MEDIA_DIRECTORY">
239                <?= /* I18N: A configuration setting */ I18N::translate('Media folder') ?>
240            </label>
241            <div class="col-sm-9">
242                <div class="input-group" dir="ltr">
243                    <span class="input-group-text" dir="ltr">
244                        <?= e($data_folder) ?>
245                    </span>
246
247                    <input class="form-control" dir="ltr" id="MEDIA_DIRECTORY" maxlength="255" name="MEDIA_DIRECTORY" type="text" value="<?= e($tree->getPreference('MEDIA_DIRECTORY')) ?>">
248                </div>
249
250                <div class="form-text">
251                    <?= /* I18N: Help text for the “Media folder” configuration setting */ I18N::translate('This folder will be used to store the media files for this family tree.') ?>
252                    <?= /* I18N: Help text for the “Media folder” configuration setting */ I18N::translate('If you select a different folder, you must also move any media files from the existing folder to the new one.') ?>
253                    <?= /* I18N: Help text for the “Media folder” configuration setting */ I18N::translate('If two family trees use the same media folder, then they will be able to share media files. If they use different media folders, then their media files will be kept separate.') ?>
254                </div>
255            </div>
256        </div>
257    <?php endif ?>
258
259    <h2><?= I18N::translate('Media files') ?></h2>
260
261    <!-- MEDIA_UPLOAD -->
262    <div class="row form-group">
263        <label class="col-sm-3 col-form-label" for="MEDIA_UPLOAD">
264            <?= /* I18N: A configuration setting */ I18N::translate('Who can upload new media files') ?>
265        </label>
266        <div class="col-sm-9">
267            <?= view('components/select', ['name' => 'MEDIA_UPLOAD', 'selected' => $tree->getPreference('MEDIA_UPLOAD'), 'options' => $privacy_options]) ?>
268            <div class="form-text">
269                <?= /* I18N: Help text for the “Who can upload new media files” configuration setting */ I18N::translate('If you are concerned that users might upload inappropriate images, you can restrict media uploads to managers only.') ?>
270            </div>
271        </div>
272    </div>
273
274    <!-- SHOW_MEDIA_DOWNLOAD -->
275    <fieldset class="row form-group">
276        <legend class="col-form-label col-sm-3">
277            <?= /* I18N: A configuration setting */ I18N::translate('Show a download link in the media viewer') ?>
278        </legend>
279        <div class="col-sm-9">
280            <?= view('components/select', ['name' => 'SHOW_MEDIA_DOWNLOAD', 'selected' => $tree->getPreference('SHOW_MEDIA_DOWNLOAD'), 'options' => Auth::accessLevelNames()]) ?>
281            <div class="form-text">
282                <?= /* I18N: Help text for the “Show a download link in the media viewer” configuration setting */ I18N::translate('This option will make it easier for users to download images.') ?>
283            </div>
284        </div>
285    </fieldset>
286
287    <h2><?= I18N::translate('Thumbnail images') ?></h2>
288
289    <!-- SHOW_HIGHLIGHT_IMAGES -->
290    <fieldset class="row form-group">
291        <legend class="col-form-label col-sm-3">
292            <?= I18N::translate('Thumbnail images') ?>
293        </legend>
294        <div class="col-sm-9">
295            <?= view('components/radios-inline', ['name' => 'SHOW_HIGHLIGHT_IMAGES', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('SHOW_HIGHLIGHT_IMAGES')]) ?>
296            <div class="form-text">
297                <?= I18N::translate('Show thumbnail images in charts and family groups.') ?>
298            </div>
299        </div>
300    </fieldset>
301
302    <!-- USE_SILHOUETTE -->
303    <fieldset class="row form-group">
304        <legend class="col-form-label col-sm-3">
305            <?= /* I18N: A configuration setting */ I18N::translate('Use silhouettes') ?>
306        </legend>
307        <div class="col-sm-9">
308            <?= view('components/radios-inline', ['name' => 'USE_SILHOUETTE', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('USE_SILHOUETTE')]) ?>
309            <div class="form-text">
310                <?= /* I18N: Help text for the “Use silhouettes” configuration setting */ I18N::translate('Use silhouette images when no highlighted image for that individual has been specified. The images used are specific to the gender of the individual in question.') ?>
311            </div>
312        </div>
313    </fieldset>
314
315    <h2><?= I18N::translate('Watermarks') ?></h2>
316
317    <!-- SHOW_NO_WATERMARK -->
318    <div class="row form-group">
319        <label class="col-sm-3 col-form-label" for="SHOW_NO_WATERMARK">
320            <?= I18N::translate('Images without watermarks') ?>
321        </label>
322        <div class="col-sm-9">
323            <?= view('components/select', ['name' => 'SHOW_NO_WATERMARK', 'selected' => $tree->getPreference('SHOW_NO_WATERMARK'), 'options' => Auth::accessLevelNames()]) ?>
324            <div class="form-text">
325                <?= /* I18N: Help text for the “Images without watermarks” configuration setting */ I18N::translate('Watermarks are optional and normally shown just to visitors.') ?>
326            </div>
327        </div>
328    </div>
329
330    <h2><?= I18N::translate('Lists') ?></h2>
331
332    <!-- SURNAME_LIST_STYLE -->
333    <div class="row form-group">
334        <label class="col-sm-3 col-form-label" for="SURNAME_LIST_STYLE">
335            <?= I18N::translate('Surname list style') ?>
336        </label>
337        <div class="col-sm-9">
338            <?= view('components/select', ['name' => 'SURNAME_LIST_STYLE', 'selected' => $tree->getPreference('SURNAME_LIST_STYLE'), 'options' => $surname_list_styles]) ?>
339            <div class="form-text">
340            </div>
341        </div>
342    </div>
343
344    <!-- SUBLIST_TRIGGER_I -->
345    <div class="row form-group">
346        <label class="col-sm-3 col-form-label" for="SUBLIST_TRIGGER_I">
347            <?= /* I18N: A configuration setting */ I18N::translate('Maximum number of surnames on individual list') ?>
348        </label>
349        <div class="col-sm-9">
350            <input
351                class="form-control"
352                id="SUBLIST_TRIGGER_I"
353                maxlength="5"
354                name="SUBLIST_TRIGGER_I"
355                required
356                type="text"
357                value="<?= e($tree->getPreference('SUBLIST_TRIGGER_I')) ?>"
358            >
359            <div class="form-text">
360                <?= /* I18N: Help text for the “Maximum number of surnames on individual list” configuration setting */ I18N::translate('Long lists of individuals with the same surname can be broken into smaller sub-lists according to the first letter of the individual’s given name.<br><br>This option determines when sub-listing of surnames will occur. To disable sub-listing completely, set this option to zero.') ?>
361            </div>
362        </div>
363    </div>
364
365    <!-- SHOW_EST_LIST_DATES -->
366    <fieldset class="row form-group">
367        <legend class="col-form-label col-sm-3">
368            <?= /* I18N: A configuration setting */ I18N::translate('Estimated dates for birth and death') ?>
369        </legend>
370        <div class="col-sm-9">
371            <?= view('components/radios-inline', ['name' => 'SHOW_EST_LIST_DATES', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('SHOW_EST_LIST_DATES')]) ?>
372            <div class="form-text">
373                <?= /* I18N: Help text for the “Estimated dates for birth and death” configuration setting */ I18N::translate('This option controls whether or not to show estimated dates for birth and death instead of leaving blanks on individual lists and charts for individuals whose dates are not known.') ?>
374            </div>
375        </div>
376    </fieldset>
377
378    <!-- SHOW_LAST_CHANGE -->
379    <fieldset class="row form-group">
380        <legend class="col-form-label col-sm-3">
381            <?= I18N::translate('The date and time of the last update') ?>
382        </legend>
383        <div class="col-sm-9">
384            <?= view('components/radios-inline', ['name' => 'SHOW_LAST_CHANGE', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('SHOW_LAST_CHANGE')]) ?>
385            <div class="form-text">
386            </div>
387        </div>
388    </fieldset>
389
390    <h2><?= I18N::translate('Charts') ?></h2>
391
392    <!-- SHOW_PARENTS_AGE -->
393    <fieldset class="row form-group">
394        <legend class="col-form-label col-sm-3">
395            <?= /* I18N: A configuration setting */ I18N::translate('Age of parents next to child’s birthdate') ?>
396        </legend>
397        <div class="col-sm-9">
398            <?= view('components/radios-inline', ['name' => 'SHOW_PARENTS_AGE', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('SHOW_PARENTS_AGE')]) ?>
399            <div class="form-text">
400                <?= /* I18N: Help text for the “Age of parents next to child’s birthdate” configuration setting */ I18N::translate('This option controls whether or not to show age of father and mother next to child’s birthdate on charts.') ?>
401            </div>
402        </div>
403    </fieldset>
404
405    <!-- CHART_BOX_TAGS -->
406    <div class="row form-group">
407        <label class="col-sm-3 col-form-label" for="CHART_BOX_TAGS">
408            <?= I18N::translate('Other facts to show in charts') ?>
409        </label>
410        <div class="col-sm-9">
411            <div class="input-group">
412                <?= view('components/select', ['name' => 'CHART_BOX_TAGS[]', 'id' => 'CHART_BOX_TAGS', 'selected' => explode(',', $tree->getPreference('CHART_BOX_TAGS')), 'options' => $all_individual_facts, 'class' => 'select2']) ?>
413            </div>
414            <div class="form-text">
415                <?= /* I18N: Help text for the “Other facts to show in charts” configuration setting */ I18N::translate('This should be a comma or space separated list of facts, in addition to birth and death, that you want to appear in chart boxes such as the pedigree chart. This list requires you to use fact tags as defined in the GEDCOM 5.5.1 standard. For example, if you wanted the occupation to show up in the box, you would add “OCCU” to this field.') ?>
416            </div>
417        </div>
418    </div>
419
420    <h2><?= I18N::translate('Individual pages') ?></h2>
421
422    <!-- SHOW_RELATIVES_EVENTS -->
423    <fieldset class="row form-group">
424        <legend class="col-form-label col-sm-3">
425            <?= I18N::translate('Show the events of close relatives on the individual page') ?>
426        </legend>
427        <div class="col-sm-3">
428            <div class="form-check">
429                <label for="_BIRT_GCHI">
430                    <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_BIRT_GCHI" value="_BIRT_GCHI" <?= in_array('_BIRT_GCHI', $relatives_events, true) ? 'checked' : '' ?>>
431                    <?= I18N::translate('Birth of a grandchild') ?>
432                </label>
433            </div>
434            <div class="form-check">
435                <label for="_BIRT_CHIL">
436                    <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_BIRT_CHIL" value="_BIRT_CHIL" <?= in_array('_BIRT_CHIL', $relatives_events, true) ? 'checked' : '' ?>>
437                    <?= I18N::translate('Birth of a child') ?>
438                </label>
439            </div>
440            <div class="form-check">
441                <label for="_BIRT_SIBL">
442                    <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_BIRT_SIBL" value="_BIRT_SIBL" <?= in_array('_BIRT_SIBL', $relatives_events, true) ? 'checked' : '' ?>>
443                    <?= I18N::translate('Birth of a sibling') ?>
444                </label>
445            </div>
446        </div>
447        <div class="col-sm-3">
448            <div class="form-check">
449                <label for="_MARR_GCHI">
450                    <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_GCHI" value="_MARR_GCHI" <?= in_array('_MARR_GCHI', $relatives_events, true) ? 'checked' : '' ?>>
451                    <?= I18N::translate('Marriage of a grandchild') ?>
452                </label>
453            </div>
454            <div class="form-check">
455                <label for="_MARR_CHIL">
456                    <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_CHIL" value="_MARR_CHIL" <?= in_array('_MARR_CHIL', $relatives_events, true) ? 'checked' : '' ?>>
457                    <?= I18N::translate('Marriage of a child') ?>
458                </label>
459            </div>
460            <div class="form-check">
461                <label for="_MARR_SIBL">
462                    <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_SIBL" value="_MARR_SIBL" <?= in_array('_MARR_SIBL', $relatives_events, true) ? 'checked' : '' ?>>
463                    <?= I18N::translate('Marriage of a sibling') ?>
464                </label>
465            </div>
466            <div class="form-check">
467                <label for="_MARR_PARE">
468                    <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_PARE" value="_MARR_PARE" <?= in_array('_MARR_PARE', $relatives_events, true) ? 'checked' : '' ?>>
469                    <?= I18N::translate('Marriage of a parent') ?>
470                </label>
471            </div>
472        </div>
473        <div class="col-sm-3">
474            <div class="form-check">
475                <label for="_DEAT_GCHI">
476                    <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_GCHI" value="_DEAT_GCHI" <?= in_array('_DEAT_GCHI', $relatives_events, true) ? 'checked' : '' ?>>
477                    <?= I18N::translate('Death of a grandchild') ?>
478                </label>
479            </div>
480            <div class="form-check">
481                <label for="_DEAT_CHIL">
482                    <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_CHIL" value="_DEAT_CHIL" <?= in_array('_DEAT_CHIL', $relatives_events, true) ? 'checked' : '' ?>>
483                    <?= I18N::translate('Death of a child') ?>
484                </label>
485            </div>
486            <div class="form-check">
487                <label for="_DEAT_SIBL">
488                    <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_SIBL" value="_DEAT_SIBL" <?= in_array('_DEAT_SIBL', $relatives_events, true) ? 'checked' : '' ?>>
489                    <?= I18N::translate('Death of a sibling') ?>
490                </label>
491            </div>
492            <div class="form-check">
493                <label for="_DEAT_PARE">
494                    <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_PARE" value="_DEAT_PARE" <?= in_array('_DEAT_PARE', $relatives_events, true) ? 'checked' : '' ?>>
495                    <?= I18N::translate('Death of a parent') ?>
496                </label>
497            </div>
498            <div class="form-check">
499                <label for="_DEAT_SPOU">
500                    <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_SPOU" value="_DEAT_SPOU" <?= in_array('_DEAT_SPOU', $relatives_events, true) ? 'checked' : '' ?>>
501                    <?= I18N::translate('Death of a spouse') ?>
502                </label>
503            </div>
504            <div class="form-check">
505                <label for="_DEAT_GPAR">
506                    <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_GPAR" value="_DEAT_GPAR" <?= in_array('_DEAT_GPAR', $relatives_events, true) ? 'checked' : '' ?>>
507                    <?= I18N::translate('Death of a grandparent') ?>
508                </label>
509            </div>
510        </div>
511    </fieldset>
512
513    <!-- SHOW_FACT_ICONS -->
514    <fieldset class="row form-group">
515        <legend class="col-form-label col-sm-3">
516            <?= /* I18N: A configuration setting */ I18N::translate('Fact icons') ?>
517        </legend>
518        <div class="col-sm-9">
519            <?= view('components/radios-inline', ['name' => 'SHOW_FACT_ICONS', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('SHOW_FACT_ICONS')]) ?>
520            <div class="form-text">
521                <?= /* I18N: Help text for the “Fact icons” configuration setting */ I18N::translate('Some themes can display icons on the “Facts and events” tab.') ?>
522            </div>
523        </div>
524    </fieldset>
525
526    <!-- EXPAND_NOTES -->
527    <fieldset class="row form-group">
528        <legend class="col-form-label col-sm-3">
529            <?= /* I18N: A configuration setting */ I18N::translate('Automatically expand notes') ?>
530        </legend>
531        <div class="col-sm-9">
532            <?= view('components/radios-inline', ['name' => 'EXPAND_NOTES', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('EXPAND_NOTES')]) ?>
533            <div class="form-text">
534                <?= /* I18N: Help text for the “Automatically expand notes” configuration setting */
535                I18N::translate('This option controls whether or not to automatically display content of a <i>Note</i> record on the Individual page.') ?>
536            </div>
537        </div>
538    </fieldset>
539
540    <!-- EXPAND_SOURCES -->
541    <fieldset class="row form-group">
542        <legend class="col-form-label col-sm-3">
543            <?= /* I18N: A configuration setting */ I18N::translate('Automatically expand sources') ?>
544        </legend>
545        <div class="col-sm-9">
546            <?= view('components/radios-inline', ['name' => 'EXPAND_SOURCES', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('EXPAND_SOURCES')]) ?>
547            <div class="form-text">
548                <?= /* I18N: Help text for the “Automatically expand sources” configuration setting */
549                I18N::translate('This option controls whether or not to automatically display content of a <i>Source</i> record on the Individual page.') ?>
550            </div>
551        </div>
552    </fieldset>
553
554    <h2><?= I18N::translate('Places') ?></h2>
555
556    <!-- SHOW_PEDIGREE_PLACES -->
557    <fieldset class="row form-group">
558        <legend class="col-form-label col-sm-3">
559            <?= /* I18N: A configuration setting */ I18N::translate('Abbreviate place names') ?>
560            <label class="visually-hidden" for="SHOW_PEDIGREE_PLACES_SUFFIX">
561                <?= /* I18N: A configuration setting */ I18N::translate('Abbreviate place names') ?>
562                <?= I18N::translate('first') ?> / <?= I18N::translate('last') ?>
563            </label>
564            <label class="visually-hidden" for="SHOW_PEDIGREE_PLACES">
565                <?= /* I18N: A configuration setting */ I18N::translate('Abbreviate place names') ?>
566            </label>
567        </legend>
568        <div class="col-sm-9">
569            <?= /* I18N: The placeholders are edit controls. Show the [first/last] [1/2/3/4/5] parts of a place name */ I18N::translate(
570                'Show the %1$s %2$s parts of a place name.',
571                view('components/select', ['name' => 'SHOW_PEDIGREE_PLACES_SUFFIX', 'selected' => $tree->getPreference('SHOW_PEDIGREE_PLACES_SUFFIX'), 'options' => ['0' => I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'first'), '1' => I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'last')]]),
572                view('components/select-number', ['name' => 'SHOW_PEDIGREE_PLACES', 'selected' => $tree->getPreference('SHOW_PEDIGREE_PLACES'), 'options' => range(1, 9)])
573            ) ?>
574            <div class="form-text">
575                <?= /* I18N: Help text for the “Abbreviate place names” configuration setting */ I18N::translate('Place names are frequently too long to fit on charts, lists, etc. They can be abbreviated by showing just the first few parts of the name, such as <i>village, county</i>, or the last few part of it, such as <i>region, country</i>.') ?>
576            </div>
577        </div>
578    </fieldset>
579
580    <h2><?= I18N::translate('Text') ?></h2>
581
582    <!-- FORMAT_TEXT -->
583    <fieldset class="row form-group">
584        <legend class="col-form-label col-sm-3">
585            <?= /* I18N: A configuration setting */ I18N::translate('Format text and notes') ?>
586        </legend>
587        <div class="col-sm-9">
588            <?= view('components/radios-inline', ['name' => 'FORMAT_TEXT', 'options' => $formats, 'selected' =>  $tree->getPreference('FORMAT_TEXT')]) ?>
589            <div class="form-text">
590                <?= /* I18N: Help text for the “Format text and notes” configuration setting */ I18N::translate('To ensure compatibility with other genealogy applications, notes, text, and transcripts should be recorded in simple, unformatted text. However, formatting is often desirable to aid presentation, comprehension, etc.') ?>
591                <br>
592                <?= /* I18N: Help text for the “Format text and notes” configuration setting */ I18N::translate('Markdown is a simple system of formatting, used on websites such as Wikipedia. It uses unobtrusive punctuation characters to create headings and sub-headings, bold and italic text, lists, tables, etc.') ?>
593            </div>
594        </div>
595    </fieldset>
596
597    <h2><?= I18N::translate('General') ?></h2>
598
599    <!-- SHOW_GEDCOM_RECORD -->
600    <fieldset class="row form-group">
601        <legend class="col-form-label col-sm-3">
602            <?= /* I18N: A configuration setting */ I18N::translate('Allow users to see raw GEDCOM records') ?>
603        </legend>
604        <div class="col-sm-9">
605            <?= view('components/radios-inline', ['name' => 'SHOW_GEDCOM_RECORD', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('SHOW_GEDCOM_RECORD')]) ?>
606            <div class="form-text">
607                <?= /* I18N: Help text for the “Allow users to see raw GEDCOM records” configuration setting */ I18N::translate('Setting this to <b>Yes</b> will place links on individuals, sources, and families to let users bring up another window containing the raw data taken right out of the GEDCOM file.') ?>
608            </div>
609        </div>
610    </fieldset>
611
612    <!-- HIDE_GEDCOM_ERRORS -->
613    <fieldset class="row form-group">
614        <legend class="col-form-label col-sm-3">
615            <?= /* I18N: A configuration setting */ I18N::translate('GEDCOM errors') ?>
616        </legend>
617        <div class="col-sm-9">
618            <?= view('components/radios-inline', ['name' => 'HIDE_GEDCOM_ERRORS', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('HIDE_GEDCOM_ERRORS')]) ?>
619            <div class="form-text">
620                <?= /* I18N: Help text for the “GEDCOM errors” configuration setting */ I18N::translate('Many genealogy programs create GEDCOM files with custom tags, and webtrees understands most of them. When unrecognized tags are found, this option lets you choose whether to ignore them or display a warning message.') ?>
621            </div>
622        </div>
623    </fieldset>
624
625    <!-- SHOW_COUNTER -->
626    <fieldset class="row form-group">
627        <legend class="col-form-label col-sm-3">
628            <?= /* I18N: A configuration setting */ I18N::translate('Hit counters') ?>
629        </legend>
630        <div class="col-sm-9">
631            <?= view('components/radios-inline', ['name' => 'SHOW_COUNTER', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('SHOW_COUNTER')]) ?>
632            <div class="form-text">
633                <?= /* I18N: Help text for the “Hit counters” configuration setting */ I18N::translate('Some pages can display the number of times that they have been visited.') ?>
634            </div>
635        </div>
636    </fieldset>
637
638    <h2><?= /* I18N: Options for editing */ I18N::translate('Edit preferences') ?></h2>
639
640    <h2><?= I18N::translate('Facts for individual records') ?></h2>
641
642    <!-- QUICK_REQUIRED_FACTS -->
643    <div class="row form-group">
644        <label class="col-sm-3 col-form-label" for="QUICK_REQUIRED_FACTS">
645            <?= I18N::translate('Facts for new individuals') ?>
646        </label>
647        <div class="col-sm-9">
648            <?= view('components/select', ['name' => 'QUICK_REQUIRED_FACTS[]', 'id' => 'QUICK_REQUIRED_FACTS', 'selected' => explode(',', $tree->getPreference('QUICK_REQUIRED_FACTS')), 'options' => $all_individual_facts, 'class' => 'select2']) ?>
649        </div>
650    </div>
651
652    <!-- INDI_FACTS_QUICK -->
653    <div class="row form-group">
654        <label class="col-sm-3 col-form-label" for="INDI_FACTS_QUICK">
655            <?= I18N::translate('Quick individual facts') ?>
656        </label>
657        <div class="col-sm-9">
658            <?= view('components/select', ['name' => 'INDI_FACTS_QUICK[]', 'id' => 'INDI_FACTS_QUICK', 'selected' => explode(',', $tree->getPreference('INDI_FACTS_QUICK')), 'options' => $all_individual_facts, 'class' => 'select2']) ?>
659            <div class="form-text">
660                <?= /* I18N: Help text for the “Quick individual facts” configuration setting */ I18N::translate('The most common individual facts and events are listed separately, so that they can be added more easily.') ?>
661            </div>
662        </div>
663    </div>
664
665    <h2><?= I18N::translate('Facts for family records') ?></h2>
666
667    <!-- QUICK_REQUIRED_FAMFACTS -->
668    <div class="row form-group">
669        <label class="col-sm-3 col-form-label" for="QUICK_REQUIRED_FAMFACTS">
670            <?= I18N::translate('Facts for new families') ?>
671        </label>
672        <div class="col-sm-9">
673            <?= view('components/select', ['name' => 'QUICK_REQUIRED_FAMFACTS[]', 'id' => 'QUICK_REQUIRED_FAMFACTS', 'selected' => explode(',', $tree->getPreference('QUICK_REQUIRED_FAMFACTS')), 'options' => $all_family_facts, 'class' => 'select2']) ?>
674        </div>
675    </div>
676
677    <!-- FAM_FACTS_QUICK -->
678    <div class="row form-group">
679        <label class="col-sm-3 col-form-label" for="FAM_FACTS_QUICK">
680            <?= I18N::translate('Quick family facts') ?>
681        </label>
682        <div class="col-sm-9">
683            <?= view('components/select', ['name' => 'FAM_FACTS_QUICK[]', 'id' => 'FAM_FACTS_QUICK', 'selected' => explode(',', $tree->getPreference('FAM_FACTS_QUICK')), 'options' => $all_family_facts, 'class' => 'select2']) ?>
684            <div class="form-text">
685                <?= /* I18N: Help text for the “Quick family facts” configuration setting */ I18N::translate('The most common family facts and events are listed separately, so that they can be added more easily.') ?>
686            </div>
687        </div>
688    </div>
689
690    <h2><?= I18N::translate('Other preferences') ?></h2>
691
692    <!-- SURNAME_TRADITION -->
693    <fieldset class="row form-group">
694        <legend class="col-form-label col-sm-3">
695            <?= I18N::translate('Surname tradition') ?>
696        </legend>
697        <div class="col-sm-9">
698            <?= view('components/radios', ['name' => 'SURNAME_TRADITION', 'options' => $all_surname_traditions, 'selected' => $tree->getPreference('SURNAME_TRADITION')]) ?>
699            <div class="form-text">
700                <?= /* I18N: Help text for the “Surname tradition” configuration setting */ I18N::translate('When you add a new family member, a default surname can be provided. This surname will depend on the local tradition.') ?>
701            </div>
702        </div>
703    </fieldset>
704
705    <!-- FULL_SOURCES -->
706    <fieldset class="row form-group">
707        <legend class="col-form-label col-sm-3">
708            <?= /* I18N: A configuration setting */ I18N::translate('Use full source citations') ?>
709        </legend>
710        <div class="col-sm-9">
711            <?= view('components/radios-inline', ['name' => 'FULL_SOURCES', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('FULL_SOURCES')]) ?>
712            <div class="form-text">
713                <?= /* I18N: Help text for the “Use full source citations” configuration setting */ I18N::translate('Source citations can include fields to record the quality of the data (primary, secondary, etc.) and the date the event was recorded in the source. If you don’t use these fields, you can disable them when creating new source citations.') ?>
714            </div>
715        </div>
716    </fieldset>
717
718    <!-- PREFER_LEVEL2_SOURCES -->
719    <fieldset class="row form-group">
720        <legend class="col-form-label col-sm-3">
721            <?= /* I18N: A configuration setting */ I18N::translate('Source type') ?>
722        </legend>
723        <div class="col-sm-9">
724            <?= view('components/radios-inline', ['name' => 'PREFER_LEVEL2_SOURCES', 'options' => $source_types, 'selected' => (int) $tree->getPreference('PREFER_LEVEL2_SOURCES')]) ?>
725            <div class="form-text">
726                <?= /* I18N: Help text for the “Source type” configuration setting */ I18N::translate('When adding new close relatives, you can add source citations to the records (individual and family) or to the facts and events (birth, marriage, and death). This option controls whether records or facts will be selected by default.') ?>
727            </div>
728        </div>
729    </fieldset>
730
731    <!-- NO_UPDATE_CHAN -->
732    <fieldset class="row form-group">
733        <legend class="col-form-label col-sm-3">
734            <?= /* I18N: A configuration setting */ I18N::translate('Keep the existing “last change” information') ?>
735        </legend>
736        <div class="col-sm-9">
737            <?= view('components/radios-inline', ['name' => 'NO_UPDATE_CHAN', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('NO_UPDATE_CHAN')]) ?>
738            <div class="form-text">
739                <?= /* I18N: Help text for the “Keep the existing ‘last change’ information” configuration setting */ I18N::translate('When a record is edited, the user and timestamp are recorded. Sometimes it is desirable to keep the existing “last change” information, for example when making minor corrections to someone else’s data. This option controls whether this feature is selected by default.') ?>
740            </div>
741        </div>
742    </fieldset>
743
744    <div class="row form-group">
745        <div class="offset-sm-3 col-sm-9">
746            <button type="submit" class="btn btn-primary">
747                <?= view('icons/save') ?>
748                <?= I18N::translate('save') ?>
749            </button>
750            <a class="btn btn-secondary" href="<?= e(route(ManageTrees::class, ['tree' => $tree->name()])) ?>">
751        <?= view('icons/cancel') ?>
752                <?= I18N::translate('cancel') ?>
753            </a>
754            <!-- Coming soon
755            <div class="form-check">
756                <?php if ($tree_count > 1) : ?>
757                <label>
758                    <input type="checkbox" name="all_trees">
759                    <?= /* I18N: Label for checkbox */ I18N::translate('Apply these preferences to all family trees') ?>
760                </label>
761                <?php endif ?>
762            </div>
763            <div class="form-check">
764                <label>
765                    <input type="checkbox" name="new_trees">
766                    <?= /* I18N: Label for checkbox */ I18N::translate('Apply these preferences to new family trees') ?>
767                </label>
768            </div>
769        </div>
770        -->
771        </div>
772</form>
773