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 <?= csrf_field() ?> 24 25 <input type="hidden" name="url" value="<?= e($url) ?>"> 26 27 <div class="form-group row"> 28 <label class="col-sm-3 col-form-label" for="from"> 29 <?= I18N::translateContext('Email sender', 'From') ?> 30 </label> 31 <div class="col-sm-9"> 32 <input class="form-control" id="from" type="text" value="<?= e($from->realName()) ?>" dir="auto" disabled> 33 </div> 34 </div> 35 36 <div class="form-group row"> 37 <label class="col-sm-3 col-form-label" for="to"> 38 <?= I18N::translateContext('Email recipient', 'To') ?> 39 </label> 40 <div class="col-sm-9"> 41 <input type="hidden" name="to" value="<?= e($to->userName()) ?>"> 42 <input class="form-control" id="to" type="text" value="<?= e($to->realName()) ?>" dir="auto" disabled> 43 </div> 44 </div> 45 46 <div class="form-group row"> 47 <label class="col-sm-3 col-form-label" for="subject"> 48 <?= I18N::translate('Subject') ?> 49 </label> 50 <div class="col-sm-9"> 51 <input class="form-control" id="subject" type="text" name="subject" value="<?= e($subject) ?>" required> 52 </div> 53 </div> 54 55 <div class="form-group row"> 56 <label class="col-sm-3 col-form-label" for="body"> 57 <?= I18N::translate('Message') ?> 58 </label> 59 <div class="col-sm-9"> 60 <textarea class="form-control" id="body" type="text" name="body" dir="auto" rows="5" required><?= e($body) ?></textarea> 61 </div> 62 </div> 63 64 <div class="form-group row"> 65 <div class="col-sm-3 col-form-label"></div> 66 <div class="col-sm-9"> 67 <button type="submit" class="btn btn-primary"> 68 <?= I18N::translate('Send') ?> 69 </button> 70 <a class="btn btn-link" href="<?= e($url) ?>"> 71 <?= I18N::translate('cancel') ?> 72 </a> 73 </div> 74 </div> 75</form> 76