1<?php 2 3declare(strict_types=1); 4 5use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel; 6use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAllPage; 7use Fisharebest\Webtrees\I18N; 8use Fisharebest\Webtrees\Individual; 9use Fisharebest\Webtrees\Tree; 10 11/** 12 * @var int $block_id 13 * @var Individual $individual 14 * @var array<string> $languages 15 * @var string $story_body 16 * @var string $story_title 17 * @var string $title 18 * @var Tree $tree 19 * @var string $url 20 */ 21 22?> 23 24<?= 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]]) ?> 25 26<h1><?= $title ?></h1> 27 28<form method="post" action="<?= e(route('module', ['module' => 'stories', 'action' => 'AdminEdit', 'block_id' => $block_id, 'tree' => $tree->name()])) ?>" class="form-horizontal"> 29 <input type="hidden" name="url" value="<?= e($url) ?>"> 30 31 <div class="row mb-3"> 32 <label for="xref" class="col-sm-3 col-form-label"> 33 <?= I18N::translate('Individual') ?> 34 </label> 35 <div class="col-sm-9"> 36 <?= view('components/select-individual', ['name' => 'xref', 'individual' => $individual, 'tree' => $tree]) ?> 37 </div> 38 </div> 39 40 <div class="row mb-3"> 41 <label for="story-title" class="col-sm-3 col-form-label"> 42 <?= I18N::translate('Story title') ?> 43 </label> 44 <div class="col-sm-9"> 45 <input type="text" class="form-control" name="story_title" id="story-title" value="<?= e($story_title) ?>"> 46 </div> 47 </div> 48 49 <div class="row mb-3"> 50 <label for="story-body" class="col-sm-3 col-form-label"> 51 <?= I18N::translate('Story') ?> 52 </label> 53 <div class="col-sm-9"> 54 <textarea name="story_body" id="story-body" class="html-edit form-control" rows="10"><?= e($story_body) ?></textarea> 55 </div> 56 </div> 57 58 <div class="row mb-3"> 59 <label class="col-sm-3 col-form-label"> 60 <?= I18N::translate('Show this block for which languages') ?> 61 </label> 62 <div class="col-sm-9"> 63 <?= view('edit/language-checkboxes', ['languages' => $languages]) ?> 64 </div> 65 </div> 66 67 <div class="row mb-3"> 68 <div class="offset-sm-3 col-sm-9"> 69 <button type="submit" class="btn btn-primary"> 70 <?= view('icons/save') ?> 71 <?= I18N::translate('save') ?> 72 </button> 73 74 <a href="<?= e($url ?: route('module', ['module' => 'stories', 'action' => 'Admin', 'tree' => $tree->name()])) ?>" class="btn btn-secondary"> 75 <?= view('icons/cancel') ?> 76 <?= I18N::translate('cancel') ?> 77 </a> 78 </div> 79 </div> 80 81 <?= csrf_field() ?> 82</form> 83