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