xref: /webtrees/resources/views/admin/email-page.phtml (revision 98116b24f349a13d59c9798d52b3efc6d56bfa47)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\Http\RequestHandlers\EmailPreferencesAction;
5use Fisharebest\Webtrees\I18N;
6
7?>
8
9<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route('admin-users') => I18N::translate('User administration'), $title]]) ?>
10
11<h1><?= $title ?></h1>
12
13<form method="post" action="<?= e(route(EmailPreferencesAction::class, ['to' => $to->userName()])) ?>">
14    <?= csrf_field() ?>
15
16    <div class="form-group row">
17        <label class="col-sm-3 col-form-label" for="from">
18            <?= I18N::translateContext('Email sender', 'From') ?>
19        </label>
20        <div class="col-sm-9">
21            <input class="form-control" id="from" type="text" value="<?= e('"' . $from->realName() . '" <' . $from->email() . '>') ?>" dir="auto" disabled>
22        </div>
23    </div>
24
25    <div class="form-group row">
26        <label class="col-sm-3 col-form-label" for="to">
27            <?= I18N::translateContext('Email recipient', 'To') ?>
28        </label>
29        <div class="col-sm-9">
30            <input class="form-control" id="to" type="text" value="<?= e('"' . $to->realName() . '" <' . $to->email() . '>') ?>" 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(route('admin-users')) ?>">
59                <?= I18N::translate('cancel') ?>
60            </a>
61        </div>
62    </div>
63</form>
64