2020-07-10 12:20:25 +00:00
|
|
|
<?= $this->extend('admin/_layout') ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->section('title') ?>
|
|
|
|
<?= lang('Episode.create') ?>
|
|
|
|
<?= $this->endSection() ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->section('content') ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_open_multipart(route_to('episode-create', $podcast->id), [
|
2020-06-26 14:34:52 +00:00
|
|
|
'method' => 'post',
|
|
|
|
'class' => 'flex flex-col max-w-md',
|
|
|
|
]) ?>
|
|
|
|
<?= csrf_field() ?>
|
|
|
|
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_label(lang('Episode.form.enclosure'), 'enclosure') ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'enclosure',
|
|
|
|
'name' => 'enclosure',
|
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'required' => 'required',
|
|
|
|
'type' => 'file',
|
|
|
|
'accept' => '.mp3,.m4a',
|
|
|
|
]) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_label(lang('Episode.form.title'), 'title') ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'title',
|
|
|
|
'name' => 'title',
|
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'value' => old('title'),
|
|
|
|
'required' => 'required',
|
|
|
|
'data-slugify' => 'title',
|
|
|
|
]) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_label(lang('Episode.form.slug'), 'slug') ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'slug',
|
|
|
|
'name' => 'slug',
|
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'value' => old('slug'),
|
|
|
|
'required' => 'required',
|
|
|
|
'data-slugify' => 'slug',
|
|
|
|
]) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2020-08-14 18:27:57 +00:00
|
|
|
<div class="mb-4">
|
|
|
|
<?= form_label(lang('Episode.form.description'), 'description') ?>
|
|
|
|
<?= form_textarea(
|
|
|
|
[
|
|
|
|
'id' => 'description',
|
|
|
|
'name' => 'description',
|
|
|
|
'class' => 'form-textarea',
|
|
|
|
'required' => 'required',
|
|
|
|
],
|
|
|
|
old('description', '', false),
|
|
|
|
'data-editor="markdown"'
|
|
|
|
) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
</div>
|
|
|
|
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_fieldset('', ['class' => 'flex mb-4']) ?>
|
|
|
|
<legend><?= lang('Episode.form.published_at.label') ?></legend>
|
|
|
|
<div class="flex flex-col flex-1">
|
|
|
|
<?= form_label(lang('Episode.form.publication_date'), 'publication_date', [
|
|
|
|
'class' => 'sr-only',
|
|
|
|
]) ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'publication_date',
|
|
|
|
'name' => 'publication_date',
|
|
|
|
'class' => 'form-input',
|
|
|
|
'value' => old('publication_date', date('Y-m-d')),
|
|
|
|
'type' => 'date',
|
|
|
|
]) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
</div>
|
|
|
|
|
2020-08-14 18:27:57 +00:00
|
|
|
<div class="flex flex-col flex-1">
|
|
|
|
<?= form_label(lang('Episode.form.publication_time'), 'publication_time', [
|
|
|
|
'class' => 'sr-only',
|
|
|
|
]) ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'publication_time',
|
|
|
|
'name' => 'publication_time',
|
|
|
|
'class' => 'form-input',
|
|
|
|
'value' => old('publication_time', date('H:i')),
|
|
|
|
'placeholder' => '--:--',
|
|
|
|
'type' => 'time',
|
|
|
|
]) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
</div>
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_fieldset_close() ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
|
|
|
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_label(lang('Episode.form.image'), 'image') ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'image',
|
|
|
|
'name' => 'image',
|
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'type' => 'file',
|
|
|
|
'accept' => '.jpg,.jpeg,.png',
|
|
|
|
]) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_label(lang('Episode.form.season_number'), 'season_number') ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'season_number',
|
|
|
|
'name' => 'season_number',
|
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'value' => old('season_number'),
|
|
|
|
'type' => 'number',
|
|
|
|
]) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_label(lang('Episode.form.episode_number'), 'episode_number') ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'episode_number',
|
|
|
|
'name' => 'episode_number',
|
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'value' => old('episode_number'),
|
|
|
|
'required' => 'required',
|
|
|
|
'type' => 'number',
|
|
|
|
]) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2020-08-14 18:27:57 +00:00
|
|
|
<label class="inline-flex items-center mb-4">
|
|
|
|
<?= form_checkbox(
|
|
|
|
['id' => 'explicit', 'name' => 'explicit', 'class' => 'form-checkbox'],
|
|
|
|
'yes',
|
|
|
|
old('explicit', false)
|
|
|
|
) ?>
|
|
|
|
<span class="ml-2"><?= lang('Episode.form.explicit') ?></span>
|
|
|
|
</label>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
<legend><?= lang('Episode.form.type.label') ?></legend>
|
|
|
|
<label for="full" class="inline-flex items-center">
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_radio(
|
|
|
|
['id' => 'full', 'name' => 'type', 'class' => 'form-radio'],
|
|
|
|
'full',
|
|
|
|
old('type') ? old('type') == 'full' : true
|
|
|
|
) ?>
|
2020-08-04 11:25:22 +00:00
|
|
|
<span class="ml-2"><?= lang('Episode.form.type.full') ?></span>
|
2020-06-26 14:34:52 +00:00
|
|
|
</label>
|
|
|
|
<label for="trailer" class="inline-flex items-center">
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_radio(
|
|
|
|
['id' => 'trailer', 'name' => 'type', 'class' => 'form-radio'],
|
|
|
|
'trailer',
|
|
|
|
old('type') ? old('type') == 'trailer' : false
|
|
|
|
) ?>
|
2020-08-04 11:25:22 +00:00
|
|
|
<span class="ml-2"><?= lang('Episode.form.type.trailer') ?></span>
|
2020-06-26 14:34:52 +00:00
|
|
|
</label>
|
|
|
|
<label for="bonus" class="inline-flex items-center">
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_radio(
|
|
|
|
['id' => 'bonus', 'name' => 'type', 'class' => 'form-radio'],
|
|
|
|
'bonus',
|
|
|
|
old('type') ? old('type') == 'bonus' : false
|
|
|
|
) ?>
|
2020-08-04 11:25:22 +00:00
|
|
|
<span class="ml-2"><?= lang('Episode.form.type.bonus') ?></span>
|
2020-06-26 14:34:52 +00:00
|
|
|
</label>
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= form_fieldset_close() ?>
|
|
|
|
|
|
|
|
<label class="inline-flex items-center mb-4">
|
|
|
|
<?= form_checkbox(
|
|
|
|
['id' => 'block', 'name' => 'block', 'class' => 'form-checkbox'],
|
|
|
|
'yes',
|
|
|
|
old('block', false)
|
|
|
|
) ?>
|
|
|
|
<span class="ml-2"><?= lang('Episode.form.block') ?></span>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<?= form_button([
|
|
|
|
'content' => lang('Episode.form.submit_create'),
|
|
|
|
'type' => 'submit',
|
|
|
|
'class' => 'self-end px-4 py-2 bg-gray-200',
|
|
|
|
]) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
|
|
|
<?= form_close() ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|