xref: /webtrees/resources/views/edit/shared-note.phtml (revision 74512d6ac146245d47cbb558ff0cd343f0619ee7)
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    <?= csrf_field() ?>
20
21    <div class="row form-group">
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 form-group 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</form>
51<?= view('modals/on-screen-keyboard') ?>
52