2021-09-02 18:34:25 +02:00
|
|
|
<?= $this->extend('_layout') ?>
|
2020-08-18 18:31:28 +02:00
|
|
|
|
|
|
|
<?= $this->section('title') ?>
|
|
|
|
<?= lang('Page.create') ?>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= $this->section('pageTitle') ?>
|
|
|
|
<?= lang('Page.create') ?>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
2020-08-18 18:31:28 +02:00
|
|
|
|
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
|
|
|
<?= form_open(route_to('page-create'), [
|
|
|
|
'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'),
|
|
|
|
'required' => 'required',
|
|
|
|
'data-slugify' => 'title',
|
|
|
|
]) ?>
|
|
|
|
|
2021-08-10 16:25:13 +02:00
|
|
|
<?= form_label(
|
|
|
|
lang('Page.form.permalink'),
|
|
|
|
'slug',
|
|
|
|
[],
|
|
|
|
) ?>
|
|
|
|
<permalink-edit class="inline-flex items-center w-full max-w-sm mb-4 text-xs" edit-label="<?= lang('Common.edit') ?>" copy-label="<?= lang('Common.copy') ?>" copied-label="<?= lang('Common.copied') ?>">
|
|
|
|
<span slot="domain" class="flex-shrink-0"><?= base_url('pages' ) . '/' ?></span>
|
2020-08-18 18:31:28 +02:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'slug',
|
|
|
|
'name' => 'slug',
|
2021-08-10 16:25:13 +02:00
|
|
|
'class' => 'form-input flex-1 w-0 text-xs',
|
2020-08-18 18:31:28 +02:00
|
|
|
'value' => old('slug'),
|
|
|
|
'required' => 'required',
|
|
|
|
'data-slugify' => 'slug',
|
2021-08-10 16:25:13 +02:00
|
|
|
'slot' => 'slug-input',
|
2020-08-18 18:31:28 +02:00
|
|
|
]) ?>
|
2021-08-10 16:25:13 +02:00
|
|
|
</permalink-edit>
|
2020-08-18 18:31:28 +02:00
|
|
|
|
|
|
|
<div class="mb-4">
|
|
|
|
<?= form_label(lang('Page.form.content'), 'content') ?>
|
2021-08-27 12:58:22 +02:00
|
|
|
<Forms.MarkdownEditor id="content" name="content" required="required" rows="20"><?= old('content', '', false) ?></Forms.MarkdownEditor>
|
2020-08-18 18:31:28 +02:00
|
|
|
</div>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
|
|
|
|
<?= button(
|
|
|
|
lang('Page.form.submit_create'),
|
2021-05-06 16:00:48 +02:00
|
|
|
'',
|
2020-10-02 17:38:16 +02:00
|
|
|
['variant' => 'primary'],
|
2021-05-06 16:00:48 +02:00
|
|
|
['type' => 'submit', 'class' => 'self-end'],
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
2020-08-18 18:31:28 +02:00
|
|
|
|
|
|
|
<?= form_close() ?>
|
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|