1e381f98dSGreg Roach<?php 2e381f98dSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 5e381f98dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ContactAction; 6e381f98dSGreg Roachuse Fisharebest\Webtrees\I18N; 77c2c99faSGreg Roachuse Fisharebest\Webtrees\Tree; 87c2c99faSGreg Roach 97c2c99faSGreg Roach/** 107c2c99faSGreg Roach * @var string $body 117c2c99faSGreg Roach * @var string $captcha 127c2c99faSGreg Roach * @var string $from_email 137c2c99faSGreg Roach * @var string $from_name 147c2c99faSGreg Roach * @var string $subject 157c2c99faSGreg Roach * @var string $title 167c2c99faSGreg Roach * @var string $to 177c2c99faSGreg Roach * @var string $to_name 187c2c99faSGreg Roach * @var string $url 197c2c99faSGreg Roach * @var Tree $tree 207c2c99faSGreg Roach */ 21e381f98dSGreg Roach 22e381f98dSGreg Roach?> 23dd6b2bfcSGreg Roach 24dd6b2bfcSGreg Roach<h2><?= $title ?></h2> 25dd6b2bfcSGreg Roach 26e381f98dSGreg Roach<form method="post" action="<?= e(route(ContactAction::class, ['tree' => $tree->name()])) ?>"> 2770ca9c90SGreg Roach <?= $captcha ?> 28d72b284aSGreg Roach <input type="hidden" name="tree" value="<?= e($tree->name()) ?>"> 29dd6b2bfcSGreg Roach <input type="hidden" name="url" value="<?= e($url) ?>"> 30dd6b2bfcSGreg Roach 319e3c2cf9SGreg Roach <div class="row mb-3"> 32dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label" for="to"> 33f80607a6SGreg Roach <?= I18N::translateContext('Email recipient', 'To') ?> 34dd6b2bfcSGreg Roach </label> 35dd6b2bfcSGreg Roach <div class="col-sm-9"> 36dd6b2bfcSGreg Roach <input type="hidden" name="to" value="<?= e($to) ?>"> 37dd6b2bfcSGreg Roach <input class="form-control" id="to" type="text" value="<?= e($to_name) ?>" disabled> 38dd6b2bfcSGreg Roach </div> 39dd6b2bfcSGreg Roach </div> 40dd6b2bfcSGreg Roach 419e3c2cf9SGreg Roach <div class="row mb-3"> 42dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label" for="from-name"> 43dd6b2bfcSGreg Roach <?= I18N::translate('Your name') ?> 44dd6b2bfcSGreg Roach </label> 45dd6b2bfcSGreg Roach <div class="col-sm-9"> 467dca5265SGreg Roach <input class="form-control" id="from-name" type="text" name="from_name" value="<?= e($from_name) ?>" required="required"> 47dd6b2bfcSGreg Roach </div> 48dd6b2bfcSGreg Roach </div> 499e3c2cf9SGreg Roach <div class="row mb-3"> 50dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label" for="from-email"> 51dd6b2bfcSGreg Roach <?= I18N::translate('Email address') ?> 52dd6b2bfcSGreg Roach </label> 53dd6b2bfcSGreg Roach <div class="col-sm-9"> 547dca5265SGreg Roach <input class="form-control" id="from-email" type="email" name="from_email" value="<?= e($from_email) ?>" required="required"> 55dd6b2bfcSGreg Roach </div> 56dd6b2bfcSGreg Roach </div> 57dd6b2bfcSGreg Roach 589e3c2cf9SGreg Roach <div class="row mb-3"> 59dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label" for="subject"> 60dd6b2bfcSGreg Roach <?= I18N::translate('Subject') ?> 61dd6b2bfcSGreg Roach </label> 62dd6b2bfcSGreg Roach <div class="col-sm-9"> 637dca5265SGreg Roach <input class="form-control" id="subject" type="text" name="subject" value="<?= e($subject) ?>" required="required"> 64dd6b2bfcSGreg Roach </div> 65dd6b2bfcSGreg Roach </div> 66dd6b2bfcSGreg Roach 679e3c2cf9SGreg Roach <div class="row mb-3"> 68dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label" for="body"> 69dd6b2bfcSGreg Roach <?= I18N::translate('Message') ?> 70dd6b2bfcSGreg Roach </label> 71dd6b2bfcSGreg Roach <div class="col-sm-9"> 727dca5265SGreg Roach <textarea class="form-control" id="body" type="text" name="body" rows="5" dir="auto" required="required"><?= e($body) ?></textarea> 73dd6b2bfcSGreg Roach </div> 74dd6b2bfcSGreg Roach </div> 75dd6b2bfcSGreg Roach 769e3c2cf9SGreg Roach <div class="row mb-3"> 77dd6b2bfcSGreg Roach <div class="col-sm-3 col-form-label"></div> 78dd6b2bfcSGreg Roach <div class="col-sm-9"> 79dd6b2bfcSGreg Roach <button type="submit" class="btn btn-primary"> 80dd6b2bfcSGreg Roach <?= I18N::translate('Send') ?> 81dd6b2bfcSGreg Roach </button> 82dd6b2bfcSGreg Roach <a class="btn btn-link" href="<?= e($url) ?>"> 83dd6b2bfcSGreg Roach <?= I18N::translate('cancel') ?> 84dd6b2bfcSGreg Roach </a> 85dd6b2bfcSGreg Roach </div> 86dd6b2bfcSGreg Roach </div> 8781443e3cSGreg Roach 8881443e3cSGreg Roach <?= csrf_field() ?> 89dd6b2bfcSGreg Roach</form> 90