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