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