xref: /webtrees/resources/views/branches-page.phtml (revision e57829396e448d173bb4be808a8b9fd89548228b)
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="row form-group">
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 form-group">
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 form-group">
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</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