xref: /webtrees/resources/views/search-replace-page.phtml (revision 090a06287954f43677f06ea778b3f67c029de8fe)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\SearchReplaceAction;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\Tree;
6
7/**
8 * @var string $context
9 * @var string $replace
10 * @var string $search
11 * @var string $title
12 * @var Tree $tree
13 */
14
15?>
16
17<h2 class="wt-page-title">
18    <?= $title ?>
19</h2>
20
21<form method="post" action="<?= e(route(SearchReplaceAction::class, ['tree' => $tree->name()])) ?>" class="wt-page-options wt-page-options-ancestors-chart hidden-print">
22    <?= csrf_field() ?>
23
24    <div class="row form-group">
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 form-group">
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 form-group">
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 form-group">
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</form>
57