xref: /webtrees/resources/views/edit/shared-note.phtml (revision c4cbcd7b5d2995f2119e8970ddb302651026bf90)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\EditNoteAction;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\Note;
6use Fisharebest\Webtrees\Tree;
7
8/**
9 * @var Note   $note
10 * @var string $title
11 * @var Tree   $tree
12 */
13
14?>
15
16<h2 class="wt-page-title"><?= $title ?></h2>
17
18<form method="post" action="<?= e(route(EditNoteAction::class, ['tree' => $tree->name(), 'xref' => $note->xref()])) ?>" class="wt-page-options">
19    <div class="row">
20        <label class="col-sm-3 col-form-label wt-page-options-label" for="NOTE">
21            <?= I18N::translate('Shared note') ?>
22        </label>
23
24        <div class="col-sm-9 wt-page-options-value">
25            <textarea class="form-control" name="NOTE" id="NOTE" rows="10" dir="auto"><?= e($note->getNote()) ?></textarea>
26
27            <a class="wt-osk-trigger" data-wt-id="NOTE" href="#" title="<?= I18N::translate('Find a special character') ?>">
28                <?= view('icons/keyboard') ?>
29                <span class="visually-hidden"><?= I18N::translate('Find a special character') ?></span>
30            </a>
31        </div>
32    </div>
33
34    <div class="row mb-3">
35        <div class="col-sm-9 offset-sm-3">
36            <button class="btn btn-primary" type="submit">
37                <?= view('icons/save') ?>
38                <?= /* I18N: A button label. */
39                I18N::translate('save') ?>
40            </button>
41            <a class="btn btn-secondary" href="<?= e($note->url()) ?>">
42                <?= view('icons/cancel') ?>
43                <?= /* I18N: A button label. */
44                I18N::translate('cancel') ?>
45            </a>
46        </div>
47    </div>
48
49    <?= csrf_field() ?>
50</form>
51
52<?= view('modals/on-screen-keyboard') ?>
53