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