xref: /webtrees/resources/views/message-page.phtml (revision 7dca5265e4312c8525862b13665feab404dce2f2)
1d70512abSGreg Roach<?php
2d70512abSGreg Roach
37c2c99faSGreg Roachuse Fisharebest\Webtrees\Contracts\UserInterface;
4d70512abSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MessageAction;
5d70512abSGreg Roachuse Fisharebest\Webtrees\I18N;
67c2c99faSGreg Roachuse Fisharebest\Webtrees\Tree;
77c2c99faSGreg Roach
87c2c99faSGreg Roach/**
97c2c99faSGreg Roach * @var string        $body
107c2c99faSGreg Roach * @var UserInterface $from
117c2c99faSGreg Roach * @var string        $subject
127c2c99faSGreg Roach * @var UserInterface $to
137c2c99faSGreg Roach * @var Tree          $tree
147c2c99faSGreg Roach * @var string        $title
157c2c99faSGreg Roach * @var string        $url
167c2c99faSGreg Roach */
17d70512abSGreg Roach
18d70512abSGreg Roach?>
19dd6b2bfcSGreg Roach
20dd6b2bfcSGreg Roach<h2><?= $title ?></h2>
21dd6b2bfcSGreg Roach
22e381f98dSGreg Roach<form method="post" action="<?= e(route(MessageAction::class, ['tree' => $tree->name()])) ?>">
23dd6b2bfcSGreg Roach    <?= csrf_field() ?>
24e381f98dSGreg Roach
25dd6b2bfcSGreg Roach    <input type="hidden" name="url" value="<?= e($url) ?>">
26dd6b2bfcSGreg Roach
27dd6b2bfcSGreg Roach    <div class="form-group row">
28dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label" for="from">
29f80607a6SGreg Roach            <?= I18N::translateContext('Email sender', 'From') ?>
30dd6b2bfcSGreg Roach        </label>
31dd6b2bfcSGreg Roach        <div class="col-sm-9">
326ce1f9b2SGreg Roach            <input class="form-control" id="from" type="text" value="<?= e($from->realName()) ?>" dir="auto" disabled>
33dd6b2bfcSGreg Roach        </div>
34dd6b2bfcSGreg Roach    </div>
35dd6b2bfcSGreg Roach
36dd6b2bfcSGreg Roach    <div class="form-group row">
37dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label" for="to">
38f80607a6SGreg Roach            <?= I18N::translateContext('Email recipient', 'To') ?>
39dd6b2bfcSGreg Roach        </label>
40dd6b2bfcSGreg Roach        <div class="col-sm-9">
41c65e00b4SGreg Roach            <input type="hidden" name="to" value="<?= e($to->userName()) ?>">
426ce1f9b2SGreg Roach            <input class="form-control" id="to" type="text" value="<?= e($to->realName()) ?>" dir="auto" disabled>
43dd6b2bfcSGreg Roach        </div>
44dd6b2bfcSGreg Roach    </div>
45dd6b2bfcSGreg Roach
46dd6b2bfcSGreg Roach    <div class="form-group row">
47dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label" for="subject">
48dd6b2bfcSGreg Roach            <?= I18N::translate('Subject') ?>
49dd6b2bfcSGreg Roach        </label>
50dd6b2bfcSGreg Roach        <div class="col-sm-9">
51*7dca5265SGreg Roach            <input class="form-control" id="subject" type="text" name="subject" value="<?= e($subject) ?>" required="required">
52dd6b2bfcSGreg Roach        </div>
53dd6b2bfcSGreg Roach    </div>
54dd6b2bfcSGreg Roach
55dd6b2bfcSGreg Roach    <div class="form-group row">
56dd6b2bfcSGreg Roach        <label class="col-sm-3 col-form-label" for="body">
57dd6b2bfcSGreg Roach            <?= I18N::translate('Message') ?>
58dd6b2bfcSGreg Roach        </label>
59dd6b2bfcSGreg Roach        <div class="col-sm-9">
60*7dca5265SGreg Roach            <textarea class="form-control" id="body" type="text" name="body" dir="auto" rows="5" required="required"><?= e($body) ?></textarea>
61dd6b2bfcSGreg Roach        </div>
62dd6b2bfcSGreg Roach    </div>
63dd6b2bfcSGreg Roach
64dd6b2bfcSGreg Roach    <div class="form-group row">
65dd6b2bfcSGreg Roach        <div class="col-sm-3 col-form-label"></div>
66dd6b2bfcSGreg Roach        <div class="col-sm-9">
67dd6b2bfcSGreg Roach            <button type="submit" class="btn btn-primary">
68dd6b2bfcSGreg Roach                <?= I18N::translate('Send') ?>
69dd6b2bfcSGreg Roach            </button>
70dd6b2bfcSGreg Roach            <a class="btn btn-link" href="<?= e($url) ?>">
71dd6b2bfcSGreg Roach                <?= I18N::translate('cancel') ?>
72dd6b2bfcSGreg Roach            </a>
73dd6b2bfcSGreg Roach        </div>
74dd6b2bfcSGreg Roach    </div>
75dd6b2bfcSGreg Roach</form>
76