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