xref: /webtrees/resources/views/modules/user_blog/edit.phtml (revision 5062b1ca554e9384a3865a8ed7fa201483b30720)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\UserPage;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\Tree;
6
7/**
8 * @var string $body
9 * @var string $subject
10 * @var string $title
11 * @var Tree   $tree
12 */
13
14?>
15
16<h2><?= $title ?></h2>
17
18<form method="post">
19    <?= csrf_field() ?>
20
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(UserPage::class, ['tree' => $tree->name()])) ?>">
54                    <?= I18N::translate('cancel') ?>
55                </a>
56            </td>
57        </tr>
58    </table>
59</form>
60