xref: /webtrees/resources/views/admin/broadcast.phtml (revision 1a218474113038005e50986fff24ebcbd58554ff)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\I18N;
5
6?>
7
8<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?>
9
10<h1><?= $title ?></h1>
11
12<form method="post" action="<?= e(route('broadcast')) ?>">
13    <?= csrf_field() ?>
14    <input type="hidden" name="url" value="<?= e($url) ?>">
15    <input type="hidden" name="tree" value="<?= e($tree->name()) ?>">
16
17    <div class="form-group row">
18        <label class="col-sm-3 col-form-label" for="from">
19            <?= I18N::translate('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::translate('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($url) ?>">
61                <?= I18N::translate('cancel') ?>
62            </a>
63        </div>
64    </div>
65</form>
66