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