= $this->extend('Modules\Admin\Views\_layout') ?>
= $this->section('title') ?>
= lang('Episode.edit') ?>
= $this->endSection() ?>
= $this->section('pageTitle') ?>
= lang('Episode.edit') ?>
= $this->endSection() ?>
= $this->section('content') ?>
= form_open_multipart(route_to('episode-edit', $podcast->id, $episode->id), [
'method' => 'post',
'class' => 'flex flex-col',
]) ?>
= csrf_field() ?>
= icon('alert', 'mr-2 text-lg flex-shrink-0') .
lang('Episode.form.warning') ?>
= form_section(
lang('Episode.form.info_section_title'),
'
',
) ?>
= component(
'Forms/Label',
['text' =>
lang('Episode.form.audio_file'), 'hint' => lang('Episode.form.audio_file_hint'),],
['for' => 'audio_file'],
) ?>
= form_input([
'id' => 'audio_file',
'name' => 'audio_file',
'class' => 'form-input mb-4',
'type' => 'file',
'accept' => '.mp3,.m4a',
]) ?>
= component(
'Forms/Label',
['text' =>
lang('Episode.form.image'), 'hint' => lang('Episode.form.image_hint'), 'isOptional' => true,],
['for' =>
'image',]
) ?>
= form_input([
'id' => 'image',
'name' => 'image',
'class' => 'form-input',
'type' => 'file',
'accept' => '.jpg,.jpeg,.png',
]) ?>
= lang(
'Common.forms.image_size_hint',
) ?>
= component(
'Forms/Label',
['text' =>
lang('Episode.form.title'), 'hint' => lang('Episode.form.title_hint'),],
['for' =>
'title',]
) ?>
= form_input([
'id' => 'title',
'name' => 'title',
'class' => 'form-input mb-4',
'value' => old('title', $episode->title),
'required' => 'required',
'data-slugify' => 'title',
]) ?>
= component(
'Forms/Label',
[
'text' => lang('Episode.form.permalink')
],
['for' => 'slug',]
) ?>
= base_url('/@' . $podcast->handle . '/episodes') . '/' ?>
= form_input([
'id' => 'slug',
'name' => 'slug',
'class' => 'form-input flex-1 w-0 text-xs',
'value' => old('slug', $episode->slug),
'required' => 'required',
'data-slugify' => 'slug',
'slot' => 'slug-input'
]) ?>
= component('Forms/Label', ['text' => lang('Episode.form.season_number')], ['for' => 'season_number']) ?>
= form_input([
'id' => 'season_number',
'name' => 'season_number',
'class' => 'form-input w-full',
'value' => old('season_number', $episode->season_number),
'type' => 'number',
]) ?>
= component('Forms/Label', ['text' => lang('Episode.form.episode_number')], ['for' => 'episode_number']) ?>
= form_input([
'id' => 'episode_number',
'name' => 'episode_number',
'class' => 'form-input w-full',
'value' => old('episode_number', $episode->number),
'type' => 'number',
]) ?>
= form_fieldset('', ['class' => 'flex mb-4 gap-1']) ?>
= form_radio(
['id' => 'full', 'name' => 'type', 'class' => 'form-radio-btn'],
'full',
old('type') ? old('type') === 'full' : $episode->type === 'full',
) ?>
= form_radio(
['id' => 'trailer', 'name' => 'type', 'class' => 'form-radio-btn'],
'trailer',
old('type') ? old('type') === 'trailer' : $episode->type === 'trailer',
) ?>
= form_radio(
['id' => 'bonus', 'name' => 'type', 'class' => 'form-radio-btn'],
'bonus',
old('type') ? old('type') === 'bonus' : $episode->type === 'bonus',
) ?>
= form_fieldset_close() ?>
= form_fieldset('', ['class' => 'mb-6']) ?>
= form_radio(
[
'id' => 'undefined',
'name' => 'parental_advisory',
'class' => 'form-radio-btn',
],
'undefined',
old('parental_advisory')
? old('parental_advisory') === 'undefined'
: $episode->parental_advisory === null,
) ?>
= form_radio(
[
'id' => 'clean',
'name' => 'parental_advisory',
'class' => 'form-radio-btn',
],
'clean',
old('parental_advisory')
? old('parental_advisory') === 'clean'
: $episode->parental_advisory === 'clean',
) ?>
= form_radio(
[
'id' => 'explicit',
'name' => 'parental_advisory',
'class' => 'form-radio-btn',
],
'explicit',
old('parental_advisory')
? old('parental_advisory') === 'explicit'
: $episode->parental_advisory === 'explicit',
) ?>
= form_fieldset_close() ?>
= form_section_close() ?>
= form_section(
lang('Episode.form.show_notes_section_title'),
lang('Episode.form.show_notes_section_subtitle'),
) ?>
= component('Forms/Label', ['text' => lang('Episode.form.description')], ['for' => 'description']) ?>
= component(
'Forms/MarkdownEditor',
[
'content' => old('description', $episode->description_markdown, false),
],
[
'id' => 'description',
'name' => 'description',
'required' => 'required',
],
) ?>
= component('Forms/Label',
[
'text' => lang('Episode.form.description_footer'),
'hint' => lang('Episode.form.description_footer_hint'),
'isOptional' => true
],
['for' => 'description_footer'],
) ?>
= component(
'Forms/MarkdownEditor',
[
'content' => old(
'description_footer',
$podcast->episode_description_footer_markdown ?? '',
false,
),
],
[
'id' => 'description_footer',
'name' => 'description_footer',
'rows' => 6
],
) ?>
= form_section_close() ?>
= form_section(
lang('Episode.form.location_section_title'),
lang('Episode.form.location_section_subtitle'),
) ?>
= component('Forms/Label',
[
'text' => lang('Episode.form.location_name'),
'hint' => lang('Episode.form.location_name_hint'),
'isOptional' => true
],
['for' => 'location_name']
) ?>
= form_input([
'id' => 'location_name',
'name' => 'location_name',
'class' => 'form-input mb-4',
'value' => old('location_name', $episode->location_name),
]) ?>
= form_section_close() ?>
= form_section(
lang('Episode.form.additional_files_section_title'),
lang('Episode.form.additional_files_section_subtitle', [
'podcastNamespaceLink' =>
'“podcast namespace”',
]),
) ?>
= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?>
= form_fieldset_close() ?>
= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?>
= form_fieldset_close() ?>
= form_section_close() ?>
= form_section(
lang('Episode.form.advanced_section_title'),
lang('Episode.form.advanced_section_subtitle'),
) ?>
= component('Forms/Label',
[
'text' => lang('Episode.form.custom_rss'),
'hint' => lang('Episode.form.custom_rss_hint'),
'isOptional' => true,
],
[
'for' => 'custom_rss',
]
) ?>
= component('Forms/XMLEditor',
[
'content' => old('custom_rss', $episode->custom_rss_string)
],
[
'id' => 'custom_rss',
'name' => 'custom_rss',
]
) ?>
= form_section_close() ?>
= component(
'Forms/Toggler',
[
'label' => lang('Episode.form.block'),
'hint' => lang('Episode.form.block_hint')
],
[
'id' => 'block',
'name' => 'block',
'value' => 'yes',
'checked' => old('block', $episode->is_blocked),
]
) ?>
= button(
lang('Episode.form.submit_edit'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
) ?>
= form_close() ?>
= $this->endSection() ?>