xref: /webtrees/resources/views/modules/descendancy_chart/page.phtml (revision 5062b1ca554e9384a3865a8ed7fa201483b30720)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4use Fisharebest\Webtrees\Individual;
5use Fisharebest\Webtrees\Tree;
6
7/**
8 * @var string               $ajax_url
9 * @var int                  $generations
10 * @var Individual           $individual
11 * @var int                  $maximum_generations
12 * @var int                  $minimum_generations
13 * @var string               $style
14 * @var array<string,string> $styles
15 * @var string               $title
16 * @var Tree                 $tree
17 */
18
19?>
20
21<h2 class="wt-page-title">
22    <?= $title ?>
23</h2>
24
25<form method="post" class="wt-page-options wt-page-options-descendants-chart d-print-none">
26    <?= csrf_field() ?>
27
28    <div class="row form-group">
29        <label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
30            <?= I18N::translate('Individual') ?>
31        </label>
32        <div class="col-sm-9 wt-page-options-value">
33            <?= view('components/select-individual', ['name' => 'xref', 'individual' => $individual, 'tree' => $tree, 'required' => true]) ?>
34        </div>
35    </div>
36
37    <div class="row form-group">
38        <label class="col-sm-3 col-form-label wt-page-options-label" for="generations">
39            <?= I18N::translate('Generations') ?>
40        </label>
41        <div class="col-sm-9 wt-page-options-value">
42            <input class="form-control" id="generations" name="generations" type="number" min="<?= e($minimum_generations) ?>" max="<?= e($maximum_generations) ?>" value="<?= e($generations) ?>" required="required">
43        </div>
44    </div>
45
46    <fieldset class="form-group">
47        <div class="row">
48            <legend class="col-form-label col-sm-3 wt-page-options-label">
49                <?= I18N::translate('Layout') ?>
50            </legend>
51            <div class="col-sm-9 wt-page-options-value">
52                <?= view('components/radios-inline', ['name' => 'style', 'options' => $styles, 'selected' => $style]) ?>
53            </div>
54        </div>
55    </fieldset>
56
57    <div class="row form-group">
58        <div class="col-form-label col-sm-3 wt-page-options-label"></div>
59        <div class="col-sm-9 wt-page-options-value">
60            <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>">
61        </div>
62    </div>
63</form>
64
65<div class="wt-ajax-load wt-page-content wt-chart wt-chart-descendants" data-ajax-url="<?= e($ajax_url) ?>"></div>
66