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