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