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