xref: /webtrees/resources/views/modules/gedcom_news/edit.phtml (revision 1270d2767576ed4a83917769b0ee3613e3b010bf)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Http\RequestHandlers\TreePage;
6use Fisharebest\Webtrees\I18N;
7use Fisharebest\Webtrees\Tree;
8
9/**
10 * @var string $body
11 * @var string $subject
12 * @var string $title
13 * @var Tree   $tree
14 */
15
16?>
17
18<h2><?= $title ?></h2>
19
20<form method="post">
21    <table>
22        <tr>
23            <th>
24                <label for="subject">
25                    <?= I18N::translate('Title') ?>
26                </label>
27            </th>
28        <tr>
29        <tr>
30            <td>
31                <input type="text" id="subject" name="subject" size="50" dir="auto" autofocus value="<?= e($subject) ?>">
32            </td>
33        </tr>
34        <tr>
35            <th>
36                <label for="body">
37                    <?= I18N::translate('Content') ?>
38                </label>
39            </th>
40        </tr>
41        <tr>
42            <td>
43                <textarea id="body" name="body" class="html-edit form-control" rows="10" dir="auto"><?= e($body) ?></textarea>
44            </td>
45        </tr>
46
47        <tr>
48            <td>
49                <button class="btn btn-primary" type="submit">
50                    <?= I18N::translate('save') ?>
51                </button>
52
53                <a class="btn btn-secondary" href="<?= e(route(TreePage::class, ['tree' => $tree->name()])) ?>">
54                    <?= I18N::translate('cancel') ?>
55                </a>
56            </td>
57        </tr>
58    </table>
59
60    <?= csrf_field() ?>
61</form>
62