xref: /webtrees/resources/views/modules/stories/edit.phtml (revision 26e1ac84be2e21522c28114803a36810b84aa8cc)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAllPage;
5use Fisharebest\Webtrees\I18N;
6
7?>
8
9<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ModulesAllPage::class) => I18N::translate('Modules'), route('module', ['module' => 'stories', 'action' => 'Admin', 'tree' => $tree->name()]) => I18N::translate('Stories'), $title]]) ?>
10
11<h1><?= $title ?></h1>
12
13<form method="post" action="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'block_id' => $block_id, 'tree' => $tree->name()])) ?>" class="form-horizontal">
14    <?= csrf_field() ?>
15
16    <div class="row form-group">
17        <label for="xref" class="col-sm-3 col-form-label">
18            <?= I18N::translate('Individual') ?>
19        </label>
20        <div class="col-sm-9">
21            <?= view('components/select-individual', ['name' => 'xref', 'individual' => $individual, 'tree' => $tree]) ?>
22        </div>
23    </div>
24
25    <div class="row form-group">
26        <label for="story-title" class="col-sm-3 col-form-label">
27            <?= I18N::translate('Story title') ?>
28        </label>
29        <div class="col-sm-9">
30            <input type="text" class="form-control" name="story_title" id="story-title" value="<?= e($story_title) ?>">
31        </div>
32    </div>
33
34    <div class="row form-group">
35        <label for="story-body" class="col-sm-3 col-form-label">
36            <?= I18N::translate('Story') ?>
37        </label>
38        <div class="col-sm-9">
39            <textarea name="story_body" id="story-body" class="html-edit form-control" rows="10"><?= e($story_body) ?></textarea>
40        </div>
41    </div>
42
43    <div class="row form-group">
44        <label class="col-sm-3 col-form-label">
45            <?= I18N::translate('Show this block for which languages') ?>
46        </label>
47        <div class="col-sm-9">
48            <?= view('edit/language-checkboxes', ['languages' => $languages]) ?>
49        </div>
50    </div>
51
52    <div class="row form-group">
53        <div class="offset-sm-3 col-sm-9">
54            <button type="submit" class="btn btn-primary">
55                <?= view('icons/save') ?>
56                <?= I18N::translate('save') ?>
57            </button>
58
59            <a href="<?= e(route('module', ['module' => 'stories', 'action' => 'Admin', 'tree' => $tree->name()])) ?>" class="btn btn-secondary">
60                <?= view('icons/cancel') ?>
61                <?= I18N::translate('cancel') ?>
62            </a>
63        </div>
64    </div>
65</form>
66