xref: /webtrees/resources/views/branches-page.phtml (revision 64c83a78b4caa4bdc810446739df37776e706d8d)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4
5/**
6 * @var string $ajax_url
7 * @var bool   $soundex_dm
8 * @var bool   $soundex_std
9 * @var string $surname
10 * @var string $title
11 */
12
13?>
14
15<h2 class="wt-page-title">
16    <?= $title ?>
17</h2>
18
19<form method="post" class="wt-page-options wt-page-options-branches d-print-none">
20    <?= csrf_field() ?>
21
22    <div class="form-group row">
23        <label class="col-form-label col-sm-3 wt-page-options-label" for="surname">
24            <?= I18N::translate('Surname') ?>
25        </label>
26
27        <div class="col-sm-9 wt-page-options-value">
28            <input class="form-control" data-autocomplete-type="SURN" type="text" name="surname" id="surname" value="<?= e($surname) ?>" dir="auto" required>
29        </div>
30    </div>
31
32    <fieldset class="form-group">
33        <div class="row">
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        </div>
43    </fieldset>
44
45    <div class="form-group row">
46        <div class="col-sm-3 wt-page-options-label"></div>
47
48        <div class="col-sm-9 wt-page-options-value">
49            <button type="submit" class="btn btn-primary">
50                <?= /* I18N: A button label. */ I18N::translate('view') ?>
51            </button>
52        </div>
53    </div>
54</form>
55
56<?php if ($ajax_url !== '') : ?>
57    <div class="wt-ajax-load wt-page-content wt-chart wt-branches" data-ajax-url="<?= e($ajax_url) ?>"></div>
58<?php endif ?>
59