xref: /webtrees/resources/views/admin/broadcast.phtml (revision ba1d7494e9648df5a87aaa3fece3e098e5ce26b1)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\BroadcastAction;
4use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
5use Fisharebest\Webtrees\I18N;
6
7?>
8
9<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?>
10
11<h1><?= $title ?></h1>
12
13<form method="post" action="<?= e(route(BroadcastAction::class)) ?>">
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()) ?>" 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 type="hidden" name="to" value="<?= e($to) ?>">
31            <input class="form-control" id="to" type="text" value="<?= e($to_names->implode(', ')) ?>" disabled>
32        </div>
33    </div>
34
35    <div class="form-group row">
36        <label class="col-sm-3 col-form-label" for="subject">
37            <?= I18N::translate('Subject') ?>
38        </label>
39        <div class="col-sm-9">
40            <input class="form-control" id="subject" type="text" name="subject" value="<?= e($subject) ?>" required>
41        </div>
42    </div>
43
44    <div class="form-group row">
45        <label class="col-sm-3 col-form-label" for="body">
46            <?= I18N::translate('Message') ?>
47        </label>
48        <div class="col-sm-9">
49            <textarea class="form-control" id="body" name="body" rows="5" dir="auto" required><?= e($body) ?></textarea>
50        </div>
51    </div>
52
53    <div class="form-group row">
54        <div class="col-sm-3 col-form-label"></div>
55        <div class="col-sm-9">
56            <button type="submit" class="btn btn-primary">
57                <?= I18N::translate('Send') ?>
58            </button>
59            <a class="btn btn-link" href="<?= e($url) ?>">
60                <?= I18N::translate('cancel') ?>
61            </a>
62        </div>
63    </div>
64</form>
65