xref: /webtrees/resources/views/branches-page.phtml (revision f7cf8a155e2743f3d124eef3d30a558ab062fa4b)
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    <?= csrf_field() ?>
24
25    <div class="form-group row">
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-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="form-group">
36        <div class="row">
37            <legend class="col-form-label col-sm-3 wt-page-options-label">
38                <?= I18N::translate('Phonetic search') ?>
39            </legend>
40
41            <div class="col-sm-9 wt-page-options-value">
42                <?= view('components/checkbox-inline', ['label' => I18N::translate('Russell'), 'name' => 'soundex_std', 'checked' => $soundex_std]) ?>
43                <?= view('components/checkbox-inline', ['label' => I18N::translate('Daitch-Mokotoff'), 'name' => 'soundex_dm', 'checked' => $soundex_dm]) ?>
44            </div>
45        </div>
46    </fieldset>
47
48    <div class="form-group row">
49        <div class="col-sm-3 wt-page-options-label"></div>
50
51        <div class="col-sm-9 wt-page-options-value">
52            <button type="submit" class="btn btn-primary">
53                <?= /* I18N: A button label. */ I18N::translate('view') ?>
54            </button>
55        </div>
56    </div>
57</form>
58
59<?php if ($ajax_url !== '') : ?>
60    <div class="wt-ajax-load wt-page-content wt-chart wt-branches" data-ajax-url="<?= e($ajax_url) ?>"></div>
61<?php endif ?>
62