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