2020-08-18 16:31:28 +00:00
|
|
|
<?= $this->extend('admin/_layout') ?>
|
|
|
|
|
|
|
|
<?= $this->section('title') ?>
|
|
|
|
<?= lang('Page.edit') ?>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= $this->section('pageTitle') ?>
|
|
|
|
<?= lang('Page.edit') ?>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
2020-08-18 16:31:28 +00:00
|
|
|
|
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
|
|
|
<?= form_open(route_to('page-edit', $page->id), [
|
|
|
|
'class' => 'flex flex-col max-w-3xl',
|
|
|
|
]) ?>
|
|
|
|
<?= csrf_field() ?>
|
|
|
|
|
|
|
|
<?= form_label(lang('Page.form.title'), 'title', ['class' => 'max-w-sm']) ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'title',
|
|
|
|
'name' => 'title',
|
|
|
|
'class' => 'form-input mb-4 max-w-sm',
|
|
|
|
'value' => old('title', $page->title),
|
|
|
|
'required' => 'required',
|
|
|
|
'data-slugify' => 'title',
|
|
|
|
]) ?>
|
|
|
|
|
|
|
|
<?= form_label(lang('Page.form.slug'), 'slug', ['class' => 'max-w-sm']) ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'slug',
|
|
|
|
'name' => 'slug',
|
|
|
|
'class' => 'form-input mb-4 max-w-sm',
|
|
|
|
'value' => old('slug', $page->slug),
|
|
|
|
'required' => 'required',
|
|
|
|
'data-slugify' => 'slug',
|
|
|
|
]) ?>
|
|
|
|
|
|
|
|
<div class="mb-4">
|
|
|
|
<?= form_label(lang('Page.form.content'), 'content') ?>
|
2021-07-29 09:41:36 +00:00
|
|
|
<?= form_markdown_editor(
|
2020-08-18 16:31:28 +00:00
|
|
|
[
|
|
|
|
'id' => 'content',
|
|
|
|
'name' => 'content',
|
|
|
|
'required' => 'required',
|
|
|
|
],
|
2021-06-08 16:57:04 +00:00
|
|
|
old('content', $page->content_markdown, false),
|
2020-08-18 16:31:28 +00:00
|
|
|
) ?>
|
|
|
|
</div>
|
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= button(
|
|
|
|
lang('Page.form.submit_edit'),
|
2021-05-06 14:00:48 +00:00
|
|
|
'',
|
2020-10-02 15:38:16 +00:00
|
|
|
['variant' => 'primary'],
|
2021-05-06 14:00:48 +00:00
|
|
|
['type' => 'submit', 'class' => 'self-end'],
|
2020-10-02 15:38:16 +00:00
|
|
|
) ?>
|
2020-08-18 16:31:28 +00:00
|
|
|
|
|
|
|
<?= form_close() ?>
|
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|