xref: /webtrees/resources/views/modules/relationships-chart/config.phtml (revision 8121b9bec19818120092699199161a1357bb8f3f)
1<?php use Fisharebest\Webtrees\Bootstrap4; ?>
2<?php use Fisharebest\Webtrees\I18N; ?>
3
4<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('modules') => I18N::translate('Modules'), $title]]) ?>
5
6<h1><?= $title ?></h1>
7<p>
8    <?= I18N::translate('Searching for all possible relationships can take a lot of time in complex trees.') ?>
9</p>
10
11<form method="post">
12    <?= csrf_field() ?>
13    <?php foreach ($all_trees as $tree) : ?>
14        <h2><?= e($tree->title()) ?></h2>
15        <div class="row form-group">
16            <label class="col-sm-3 col-form-label" for="relationship-ancestors-<?= $tree->id() ?>">
17                <?= /* I18N: Configuration option */
18                I18N::translate('Relationships') ?>
19            </label>
20            <div class="col-sm-9">
21                <?= Bootstrap4::select($ancestors_options, $tree->getPreference('RELATIONSHIP_ANCESTORS', $default_ancestors), ['id' => 'relationship-ancestors-' . $tree->id(), 'name' => 'relationship-ancestors-' . $tree->id()]) ?>
22            </div>
23        </div>
24
25        <fieldset class="form-group">
26            <div class="row">
27                <legend class="col-form-label col-sm-3">
28                    <?= /* I18N: Configuration option */
29                    I18N::translate('How much recursion to use when searching for relationships') ?>
30                </legend>
31                <div class="col-sm-9">
32                    <?= Bootstrap4::radioButtons('relationship-recursion-' . $tree->id(), $recursion_options, $tree->getPreference('RELATIONSHIP_RECURSION', $default_recursion), true) ?>
33                </div>
34            </div>
35        </fieldset>
36    <?php endforeach ?>
37
38    <div class="row form-group">
39        <div class="offset-sm-3 col-sm-9">
40            <button type="submit" class="btn btn-primary">
41                <?= view('icons/save') ?>
42                <?= I18N::translate('save') ?>
43            </button>
44        </div>
45    </div>
46</form>
47