xref: /webtrees/resources/views/contact-page.phtml (revision b8fc901f205cd6af65496b916bf63547a3065a2f)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ContactAction;
4use Fisharebest\Webtrees\I18N;
5
6?>
7
8<h2><?= $title ?></h2>
9
10<form method="post" action="<?= e(route(ContactAction::class, ['tree' => $tree->name()])) ?>">
11    <?= csrf_field() ?>
12    <input type="hidden" name="tree" value="<?= e($tree->name()) ?>">
13    <input type="hidden" name="url" value="<?= e($url) ?>">
14
15    <div class="form-group row">
16        <label class="col-sm-3 col-form-label" for="to">
17            <?= I18N::translateContext('Email recipient', 'To') ?>
18        </label>
19        <div class="col-sm-9">
20            <input type="hidden" name="to" value="<?= e($to) ?>">
21            <input class="form-control" id="to" type="text" value="<?= e($to_name) ?>" disabled>
22        </div>
23    </div>
24
25    <div class="form-group row">
26        <label class="col-sm-3 col-form-label" for="from-name">
27            <?= I18N::translate('Your name') ?>
28        </label>
29        <div class="col-sm-9">
30            <input class="form-control" id="from-name" type="text" name="from_name" value="<?= e($from_name) ?>" required>
31        </div>
32    </div>
33    <div class="form-group row">
34        <label class="col-sm-3 col-form-label" for="from-email">
35            <?= I18N::translate('Email address') ?>
36        </label>
37        <div class="col-sm-9">
38            <input class="form-control" id="from-email" type="email" name="from_email" value="<?= e($from_email) ?>" required>
39        </div>
40    </div>
41
42    <div class="form-group row">
43        <label class="col-sm-3 col-form-label" for="subject">
44            <?= I18N::translate('Subject') ?>
45        </label>
46        <div class="col-sm-9">
47            <input class="form-control" id="subject" type="text" name="subject" value="<?= e($subject) ?>" required>
48        </div>
49    </div>
50
51    <div class="form-group row">
52        <label class="col-sm-3 col-form-label" for="body">
53            <?= I18N::translate('Message') ?>
54        </label>
55        <div class="col-sm-9">
56            <textarea class="form-control" id="body" type="text" name="body" rows="5" dir="auto" required><?= e($body) ?></textarea>
57        </div>
58    </div>
59
60    <div class="form-group row">
61        <div class="col-sm-3 col-form-label"></div>
62        <div class="col-sm-9">
63            <button type="submit" class="btn btn-primary">
64                <?= I18N::translate('Send') ?>
65            </button>
66            <a class="btn btn-link" href="<?= e($url) ?>">
67                <?= I18N::translate('cancel') ?>
68            </a>
69        </div>
70    </div>
71</form>
72