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