xref: /webtrees/resources/views/branches-page.phtml (revision b11cdcd45131b1585d66693fab363cfeb18c51a4)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Http\RequestHandlers\AutoCompleteSurname;
6use Fisharebest\Webtrees\I18N;
7use Fisharebest\Webtrees\Tree;
8
9/**
10 * @var string $ajax_url
11 * @var bool   $soundex_dm
12 * @var bool   $soundex_std
13 * @var string $surname
14 * @var string $title
15 * @var Tree   $tree
16 */
17
18?>
19
20<h2 class="wt-page-title">
21    <?= $title ?>
22</h2>
23
24<form method="post" class="wt-page-options wt-page-options-branches d-print-none">
25    <div class="row mb-3">
26        <label class="col-form-label col-sm-3 wt-page-options-label" for="surname">
27            <?= I18N::translate('Surname') ?>
28        </label>
29
30        <div class="col-sm-9 wt-page-options-value">
31            <input class="form-control" data-wt-autocomplete-url="<?= e(route(AutoCompleteSurname::class, ['tree' => $tree->name()])) ?>" autocomplete="off" type="text" name="surname" id="surname" value="<?= e($surname) ?>" dir="auto" required="required">
32        </div>
33    </div>
34
35    <fieldset class="row mb-3">
36        <legend class="col-form-label col-sm-3 wt-page-options-label">
37            <?= I18N::translate('Phonetic search') ?>
38        </legend>
39
40        <div class="col-sm-9 wt-page-options-value">
41            <?= view('components/checkbox-inline', ['label' => I18N::translate('Russell'), 'name' => 'soundex_std', 'checked' => $soundex_std]) ?>
42            <?= view('components/checkbox-inline', ['label' => I18N::translate('Daitch-Mokotoff'), 'name' => 'soundex_dm', 'checked' => $soundex_dm]) ?>
43        </div>
44    </fieldset>
45
46    <div class="row mb-3">
47        <div class="col-sm-3 wt-page-options-label"></div>
48
49        <div class="col-sm-9 wt-page-options-value">
50            <button type="submit" class="btn btn-primary">
51                <?= /* I18N: A button label. */ I18N::translate('view') ?>
52            </button>
53        </div>
54    </div>
55
56    <?= csrf_field() ?>
57</form>
58
59<?php if ($ajax_url !== '') : ?>
60    <div class="wt-ajax-load wt-page-content wt-chart wt-branches" data-wt-ajax-url="<?= e($ajax_url) ?>"></div>
61<?php endif ?>
62