xref: /webtrees/resources/views/search-replace-page.phtml (revision 4a9a60957058ca2a34e30a0d6f783e1540606590)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Http\RequestHandlers\SearchReplaceAction;
6use Fisharebest\Webtrees\I18N;
7use Fisharebest\Webtrees\Tree;
8
9/**
10 * @var string $context
11 * @var string $replace
12 * @var string $search
13 * @var string $title
14 * @var Tree $tree
15 */
16
17?>
18
19<h2 class="wt-page-title">
20    <?= $title ?>
21</h2>
22
23<form method="post" action="<?= e(route(SearchReplaceAction::class, ['tree' => $tree->name()])) ?>" class="wt-page-options wt-page-options-ancestors-chart hidden-print">
24    <div class="row">
25        <label class="col-sm-3 col-form-label wt-page-options-label" for="search">
26            <?= I18N::translate('Search for') ?>
27        </label>
28        <div class="col-sm-9 wt-page-options-value">
29            <input class="form-control" id="search" name="search" value="<?= e($search) ?>" type="text" autofocus>
30        </div>
31    </div>
32
33    <div class="row">
34        <label class="col-sm-3 col-form-label wt-page-options-label" for="replace">
35            <?= I18N::translate('Replace with') ?>
36        </label>
37        <div class="col-sm-9 wt-page-options-value">
38            <input class="form-control" id="replace" name="replace" value="<?= e($replace) ?>" type="text">
39        </div>
40    </div>
41
42    <div class="row">
43        <label class="col-sm-3 col-form-label wt-page-options-label">
44            <?= /* I18N: A button label. */ I18N::translate('Search') ?>
45        </label>
46        <div class="col-sm-9 wt-page-options-value">
47            <?= view('components/radios-inline', ['name' => 'context', 'options' => ['all' => I18N::translate('Entire record'), 'name' => I18N::translate('Names'), 'place' => I18N::translate('Places')], 'selected' => $context]) ?>
48        </div>
49    </div>
50    <div class="row">
51        <label class="col-sm-3 col-form-label wt-page-options-label"></label>
52        <div class="col-sm-9 wt-page-options-value">
53            <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('replace') ?>">
54        </div>
55    </div>
56
57    <?= csrf_field() ?>
58</form>
59