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