10c0910bfSGreg Roach<?php 2dd6b2bfcSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 57c2c99faSGreg Roachuse Fisharebest\Webtrees\Contracts\UserInterface; 6e381f98dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\BroadcastAction; 70c0910bfSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel; 80c0910bfSGreg Roachuse Fisharebest\Webtrees\I18N; 97c2c99faSGreg Roachuse Illuminate\Support\Collection; 107c2c99faSGreg Roach 117c2c99faSGreg Roach/** 127c2c99faSGreg Roach * @var UserInterface $from 137c2c99faSGreg Roach * @var string $title 147c2c99faSGreg Roach * @var string $to 15a46dd5a6SGreg Roach * @var Collection<int,UserInterface> $recipients 167c2c99faSGreg Roach */ 170c0910bfSGreg Roach 180c0910bfSGreg Roach?> 190c0910bfSGreg Roach 200c0910bfSGreg Roach<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?> 21dd6b2bfcSGreg Roach 22dd6b2bfcSGreg Roach<h1><?= $title ?></h1> 23dd6b2bfcSGreg Roach 24a46dd5a6SGreg Roach<form method="post" action="<?= e(route(BroadcastAction::class, ['to' => $to])) ?>"> 259e3c2cf9SGreg Roach <div class="row mb-3"> 26dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label" for="from"> 27f80607a6SGreg Roach <?= I18N::translateContext('Email sender', 'From') ?> 28dd6b2bfcSGreg Roach </label> 29dd6b2bfcSGreg Roach <div class="col-sm-9"> 30e5a6b4d4SGreg Roach <input class="form-control" id="from" type="text" value="<?= e($from->realName()) ?>" disabled> 31dd6b2bfcSGreg Roach </div> 32dd6b2bfcSGreg Roach </div> 33dd6b2bfcSGreg Roach 349e3c2cf9SGreg Roach <div class="row mb-3"> 35dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label" for="to"> 36f80607a6SGreg Roach <?= I18N::translateContext('Email recipient', 'To') ?> 37dd6b2bfcSGreg Roach </label> 38dd6b2bfcSGreg Roach <div class="col-sm-9"> 39a46dd5a6SGreg Roach <input class="form-control" id="to" type="text" value="<?= $recipients->map(static fn (UserInterface $user): string => e($user->realName()))->implode(', ') ?>" disabled> 40dd6b2bfcSGreg Roach </div> 41dd6b2bfcSGreg Roach </div> 42dd6b2bfcSGreg Roach 439e3c2cf9SGreg Roach <div class="row mb-3"> 44dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label" for="subject"> 45dd6b2bfcSGreg Roach <?= I18N::translate('Subject') ?> 46dd6b2bfcSGreg Roach </label> 47dd6b2bfcSGreg Roach <div class="col-sm-9"> 48a46dd5a6SGreg Roach <input class="form-control" id="subject" type="text" name="subject" required="required"> 49dd6b2bfcSGreg Roach </div> 50dd6b2bfcSGreg Roach </div> 51dd6b2bfcSGreg Roach 529e3c2cf9SGreg Roach <div class="row mb-3"> 53dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label" for="body"> 54dd6b2bfcSGreg Roach <?= I18N::translate('Message') ?> 55dd6b2bfcSGreg Roach </label> 56dd6b2bfcSGreg Roach <div class="col-sm-9"> 57a46dd5a6SGreg Roach <textarea class="form-control" id="body" name="body" rows="5" dir="auto" required="required"></textarea> 58dd6b2bfcSGreg Roach </div> 59dd6b2bfcSGreg Roach </div> 60dd6b2bfcSGreg Roach 619e3c2cf9SGreg Roach <div class="row mb-3"> 62dd6b2bfcSGreg Roach <div class="col-sm-3 col-form-label"></div> 63dd6b2bfcSGreg Roach <div class="col-sm-9"> 64dd6b2bfcSGreg Roach <button type="submit" class="btn btn-primary"> 65dd6b2bfcSGreg Roach <?= I18N::translate('Send') ?> 66dd6b2bfcSGreg Roach </button> 67a46dd5a6SGreg Roach <a class="btn btn-link" href="<?= e(route(ControlPanel::class)) ?>"> 68dd6b2bfcSGreg Roach <?= I18N::translate('cancel') ?> 69dd6b2bfcSGreg Roach </a> 70dd6b2bfcSGreg Roach </div> 71dd6b2bfcSGreg Roach </div> 7281443e3cSGreg Roach 7381443e3cSGreg Roach <?= csrf_field() ?> 74dd6b2bfcSGreg Roach</form> 75