xref: /webtrees/resources/views/branches-page.phtml (revision d4786c66945cca20d5ce34ac3cf08cf5a5110ae2)
171378461SGreg Roach<?php
271378461SGreg Roach
363763244SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AutoCompleteSurname;
471378461SGreg Roachuse Fisharebest\Webtrees\I18N;
563763244SGreg Roachuse Fisharebest\Webtrees\Tree;
671378461SGreg Roach
706a438b4SGreg Roach/**
806a438b4SGreg Roach * @var string $ajax_url
906a438b4SGreg Roach * @var bool   $soundex_dm
1006a438b4SGreg Roach * @var bool   $soundex_std
1106a438b4SGreg Roach * @var string $surname
1206a438b4SGreg Roach * @var string $title
1363763244SGreg Roach * @var Tree   $tree
1406a438b4SGreg Roach */
1506a438b4SGreg Roach
1671378461SGreg Roach?>
17dd6b2bfcSGreg Roach
18dd6b2bfcSGreg Roach<h2 class="wt-page-title">
19dd6b2bfcSGreg Roach    <?= $title ?>
20dd6b2bfcSGreg Roach</h2>
21dd6b2bfcSGreg Roach
22808ea2d4SGreg Roach<form method="post" class="wt-page-options wt-page-options-branches d-print-none">
23808ea2d4SGreg Roach    <?= csrf_field() ?>
24dd6b2bfcSGreg Roach
25315eb316SGreg Roach    <div class="row form-group">
26dd6b2bfcSGreg Roach        <label class="col-form-label col-sm-3 wt-page-options-label" for="surname">
27dd6b2bfcSGreg Roach            <?= I18N::translate('Surname') ?>
28dd6b2bfcSGreg Roach        </label>
2906a438b4SGreg Roach
30dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
31*d4786c66SGreg Roach            <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">
32dd6b2bfcSGreg Roach        </div>
33dd6b2bfcSGreg Roach    </div>
34dd6b2bfcSGreg Roach
35315eb316SGreg Roach    <fieldset class="row form-group">
36dd6b2bfcSGreg Roach        <legend class="col-form-label col-sm-3 wt-page-options-label">
37dd6b2bfcSGreg Roach            <?= I18N::translate('Phonetic search') ?>
38dd6b2bfcSGreg Roach        </legend>
3906a438b4SGreg Roach
40dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
41b6c326d8SGreg Roach            <?= view('components/checkbox-inline', ['label' => I18N::translate('Russell'), 'name' => 'soundex_std', 'checked' => $soundex_std]) ?>
42b6c326d8SGreg Roach            <?= view('components/checkbox-inline', ['label' => I18N::translate('Daitch-Mokotoff'), 'name' => 'soundex_dm', 'checked' => $soundex_dm]) ?>
43dd6b2bfcSGreg Roach        </div>
44dd6b2bfcSGreg Roach    </fieldset>
45dd6b2bfcSGreg Roach
46315eb316SGreg Roach    <div class="row form-group">
4706a438b4SGreg Roach        <div class="col-sm-3 wt-page-options-label"></div>
4806a438b4SGreg Roach
49dd6b2bfcSGreg Roach        <div class="col-sm-9 wt-page-options-value">
50dd6b2bfcSGreg Roach            <button type="submit" class="btn btn-primary">
51dd6b2bfcSGreg Roach                <?= /* I18N: A button label. */ I18N::translate('view') ?>
52dd6b2bfcSGreg Roach            </button>
53dd6b2bfcSGreg Roach        </div>
54dd6b2bfcSGreg Roach    </div>
55dd6b2bfcSGreg Roach</form>
56dd6b2bfcSGreg Roach
5706a438b4SGreg Roach<?php if ($ajax_url !== '') : ?>
58*d4786c66SGreg Roach    <div class="wt-ajax-load wt-page-content wt-chart wt-branches" data-wt-ajax-url="<?= e($ajax_url) ?>"></div>
59dd6b2bfcSGreg Roach<?php endif ?>
60