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