2021-09-02 16:34:25 +00:00
|
|
|
<?= $this->extend('_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-10-02 15:38:16 +00:00
|
|
|
<?= $this->section('pageTitle') ?>
|
|
|
|
<?= 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',
|
2020-10-02 15:38:16 +00:00
|
|
|
'class' => 'flex flex-col',
|
2020-06-26 14:34:52 +00:00
|
|
|
]) ?>
|
|
|
|
<?= csrf_field() ?>
|
2020-10-22 17:41:59 +00:00
|
|
|
<?= form_hidden('client_timezone', 'UTC') ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2021-04-08 10:45:58 +00:00
|
|
|
<div class="inline-flex w-full p-2 mb-4 text-sm font-semibold text-yellow-800 bg-red-100 border border-red-300 rounded" role="alert">
|
|
|
|
<?= icon('alert', 'mr-2 text-lg flex-shrink-0') .
|
|
|
|
lang('Episode.form.warning') ?>
|
|
|
|
</div>
|
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= form_section(
|
2021-09-08 15:51:33 +00:00
|
|
|
lang('Episode.form.info_section_title'),
|
|
|
|
lang('Episode.form.info_section_subtitle'),
|
|
|
|
) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label for="audio_file" hint="<?= lang('Episode.form.audio_file_hint') ?>"><?= lang('Episode.form.audio_file') ?></Forms.Label>
|
2020-10-15 11:07:32 +00:00
|
|
|
<?= form_input([
|
2021-05-03 17:39:58 +00:00
|
|
|
'id' => 'audio_file',
|
|
|
|
'name' => 'audio_file',
|
2020-10-15 11:07:32 +00:00
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'required' => 'required',
|
|
|
|
'type' => 'file',
|
|
|
|
'accept' => '.mp3,.m4a',
|
|
|
|
]) ?>
|
|
|
|
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label for="image" hint="<?= lang('Episode.form.image_hint') ?>" isOptional="true"><?= lang('Episode.form.image') ?></Forms.Label>
|
2020-09-08 11:45:17 +00:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'image',
|
|
|
|
'name' => 'image',
|
|
|
|
'class' => 'form-input',
|
|
|
|
'type' => 'file',
|
|
|
|
'accept' => '.jpg,.jpeg,.png',
|
|
|
|
]) ?>
|
|
|
|
<small class="mb-4 text-gray-600"><?= lang(
|
2021-04-08 10:45:58 +00:00
|
|
|
'Common.forms.image_size_hint',
|
2020-09-08 11:45:17 +00:00
|
|
|
) ?></small>
|
|
|
|
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label for="title" hint="<?= lang('Episode.form.title_hint') ?>"><?= lang('Episode.form.title') ?></Forms.Label>
|
2020-08-14 18:27:57 +00:00
|
|
|
<?= 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
|
|
|
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label for="slug"><?= lang('Episode.form.permalink') ?></Forms.Label>
|
2021-08-10 14:25:13 +00:00
|
|
|
<permalink-edit class="inline-flex items-center mb-4 text-xs" edit-label="<?= lang('Common.edit') ?>" copy-label="<?= lang('Common.copy') ?>" copied-label="<?= lang('Common.copied') ?>">
|
2021-09-08 15:51:33 +00:00
|
|
|
<span slot="domain"><?= base_url('/@' . $podcast->handle . '/episodes') . '/' ?></span>
|
2021-08-10 14:25:13 +00:00
|
|
|
<?= form_input([
|
2021-09-08 15:51:33 +00:00
|
|
|
'id' => 'slug',
|
|
|
|
'name' => 'slug',
|
|
|
|
'class' => 'form-input flex-1 w-0 text-xs',
|
|
|
|
'value' => old('slug'),
|
|
|
|
'required' => 'required',
|
|
|
|
'data-slugify' => 'slug',
|
|
|
|
'slot' => 'slug-input',
|
2021-08-10 14:25:13 +00:00
|
|
|
]) ?>
|
|
|
|
</permalink-edit>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<div class="flex flex-col mb-4 gap-x-2 gap-y-4 md:flex-row">
|
|
|
|
<div class="flex flex-col flex-1">
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label for="season_number"><?= lang('Episode.form.season_number') ?></Forms.Label>
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'season_number',
|
|
|
|
'name' => 'season_number',
|
|
|
|
'class' => 'form-input w-full',
|
|
|
|
'value' => old('season_number'),
|
|
|
|
'type' => 'number',
|
|
|
|
]) ?>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-col flex-1">
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label for="episode_number"><?= lang('Episode.form.episode_number') ?></Forms.Label>
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'episode_number',
|
|
|
|
'name' => 'episode_number',
|
|
|
|
'class' => 'form-input w-full',
|
|
|
|
'value' => old('episode_number'),
|
|
|
|
'type' => 'number',
|
|
|
|
]) ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2021-09-08 15:51:33 +00:00
|
|
|
<?= form_fieldset('', [
|
|
|
|
'class' => 'mb-4',
|
|
|
|
]) ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
<legend>
|
|
|
|
<?= lang('Episode.form.type.label') .
|
|
|
|
hint_tooltip(lang('Episode.form.type.hint'), 'ml-1') ?>
|
|
|
|
</legend>
|
|
|
|
<?= form_radio(
|
2021-09-08 15:51:33 +00:00
|
|
|
[
|
|
|
|
'id' => 'full',
|
|
|
|
'name' => 'type',
|
|
|
|
'class' => 'form-radio-btn',
|
|
|
|
],
|
|
|
|
'full',
|
|
|
|
old('type') ? old('type') === 'full' : true,
|
|
|
|
) ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
<label for="full" class="inline-flex items-center">
|
|
|
|
<?= lang('Episode.form.type.full') ?>
|
|
|
|
</label>
|
|
|
|
<?= form_radio(
|
2021-09-08 15:51:33 +00:00
|
|
|
[
|
|
|
|
'id' => 'trailer',
|
|
|
|
'name' => 'type',
|
|
|
|
'class' => 'form-radio-btn',
|
|
|
|
],
|
|
|
|
'trailer',
|
|
|
|
old('type') && old('type') === 'trailer',
|
|
|
|
) ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
<label for="trailer" class="inline-flex items-center">
|
|
|
|
<?= lang('Episode.form.type.trailer') ?>
|
|
|
|
</label>
|
|
|
|
<?= form_radio(
|
2021-09-08 15:51:33 +00:00
|
|
|
[
|
|
|
|
'id' => 'bonus',
|
|
|
|
'name' => 'type',
|
|
|
|
'class' => 'form-radio-btn',
|
|
|
|
],
|
|
|
|
'bonus',
|
|
|
|
old('type') && old('type') === 'bonus',
|
|
|
|
) ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
<label for="bonus" class="inline-flex items-center">
|
|
|
|
<?= lang('Episode.form.type.bonus') ?>
|
|
|
|
</label>
|
|
|
|
<?= form_fieldset_close() ?>
|
|
|
|
|
2021-09-08 15:51:33 +00:00
|
|
|
<?= form_fieldset('', [
|
|
|
|
'class' => 'flex mb-6 gap-1',
|
|
|
|
]) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<legend>
|
|
|
|
<?= lang('Episode.form.parental_advisory.label') .
|
|
|
|
hint_tooltip(lang('Episode.form.parental_advisory.hint'), 'ml-1') ?>
|
|
|
|
</legend>
|
|
|
|
<?= form_radio(
|
2021-09-08 15:51:33 +00:00
|
|
|
[
|
|
|
|
'id' => 'undefined',
|
|
|
|
'name' => 'parental_advisory',
|
|
|
|
'class' => 'form-radio-btn',
|
|
|
|
],
|
|
|
|
'undefined',
|
|
|
|
old('parental_advisory')
|
2021-04-02 17:20:02 +00:00
|
|
|
? old('parental_advisory') === 'undefined'
|
2021-04-08 10:45:58 +00:00
|
|
|
: true,
|
2021-09-08 15:51:33 +00:00
|
|
|
) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<label for="undefined"><?= lang(
|
2021-09-08 15:51:33 +00:00
|
|
|
'Episode.form.parental_advisory.undefined',
|
|
|
|
) ?></label>
|
2021-04-02 17:20:02 +00:00
|
|
|
<?= form_radio(
|
2021-09-08 15:51:33 +00:00
|
|
|
[
|
|
|
|
'id' => 'clean',
|
|
|
|
'name' => 'parental_advisory',
|
|
|
|
'class' => 'form-radio-btn',
|
|
|
|
],
|
|
|
|
'clean',
|
|
|
|
old('parental_advisory') && old('parental_advisory') === 'clean',
|
|
|
|
) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<label for="clean"><?= lang(
|
2021-09-08 15:51:33 +00:00
|
|
|
'Episode.form.parental_advisory.clean',
|
|
|
|
) ?></label>
|
2021-04-02 17:20:02 +00:00
|
|
|
<?= form_radio(
|
2021-09-08 15:51:33 +00:00
|
|
|
[
|
|
|
|
'id' => 'explicit',
|
|
|
|
'name' => 'parental_advisory',
|
|
|
|
'class' => 'form-radio-btn',
|
|
|
|
],
|
|
|
|
'explicit',
|
|
|
|
old('parental_advisory') && old('parental_advisory') === 'explicit',
|
|
|
|
) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<label for="explicit"><?= lang(
|
2021-09-08 15:51:33 +00:00
|
|
|
'Episode.form.parental_advisory.explicit',
|
|
|
|
) ?></label>
|
2021-04-02 17:20:02 +00:00
|
|
|
<?= form_fieldset_close() ?>
|
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= form_section_close() ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?= form_section(
|
2021-09-08 15:51:33 +00:00
|
|
|
lang('Episode.form.show_notes_section_title'),
|
|
|
|
lang('Episode.form.show_notes_section_subtitle'),
|
|
|
|
) ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
|
2020-08-14 18:27:57 +00:00
|
|
|
<div class="mb-4">
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label for="description"><?= lang('Episode.form.description') ?></Forms.Label>
|
|
|
|
<Forms.MarkdownEditor id="description" name="description" required="required"><?= old('description', '', false) ?></Forms.MarkdownEditor>
|
2020-06-26 14:34:52 +00:00
|
|
|
</div>
|
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<div class="mb-4">
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label for="description_footer" hint="<?= lang('Episode.form.description_footer_hint') ?>" isOptional="true"><?= lang('Episode.form.description_footer') ?></Forms.Label>
|
|
|
|
<Forms.MarkdownEditor id="description_footer" name="description_footer" rows="6"><?= old('description_footer', $podcast->episode_description_footer_markdown ?? '', false) ?></Forms.MarkdownEditor>
|
2020-10-02 15:38:16 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<?= form_section_close() ?>
|
|
|
|
|
2020-12-23 14:11:38 +00:00
|
|
|
<?= form_section(
|
2021-09-08 15:51:33 +00:00
|
|
|
lang('Episode.form.location_section_title'),
|
|
|
|
lang('Episode.form.location_section_subtitle'),
|
|
|
|
) ?>
|
2020-12-23 14:11:38 +00:00
|
|
|
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label for="location_name" hint="<?= lang('Episode.form.location_name_hint') ?>" isOptional="true"><?= lang('Episode.form.location_name') ?></Forms.Label>
|
2020-12-23 14:11:38 +00:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'location_name',
|
|
|
|
'name' => 'location_name',
|
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'value' => old('location_name'),
|
|
|
|
]) ?>
|
|
|
|
<?= form_section_close() ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
|
2020-11-24 20:18:08 +00:00
|
|
|
<?= form_section(
|
|
|
|
lang('Episode.form.additional_files_section_title'),
|
2021-04-08 10:45:58 +00:00
|
|
|
lang('Episode.form.additional_files_section_subtitle'),
|
2020-11-24 20:18:08 +00:00
|
|
|
) ?>
|
2021-05-03 17:39:58 +00:00
|
|
|
|
2021-09-08 15:51:33 +00:00
|
|
|
<?= form_fieldset('', [
|
|
|
|
'class' => 'flex flex-col mb-4',
|
|
|
|
]) ?>
|
2021-05-03 17:39:58 +00:00
|
|
|
<legend><?= lang('Episode.form.transcript') .
|
|
|
|
'<small class="ml-1 lowercase">(' .
|
|
|
|
lang('Common.optional') .
|
|
|
|
')</small>' .
|
|
|
|
hint_tooltip(lang('Episode.form.transcript_hint'), 'ml-1') ?></legend>
|
|
|
|
<div class="mb-4 form-input-tabs">
|
|
|
|
<input type="radio" name="transcript-choice" id="transcript-file-upload-choice" aria-controls="transcript-file-upload-choice" value="upload-file" <?= old(
|
|
|
|
'transcript-choice',
|
|
|
|
) !== 'remote-url'
|
|
|
|
? 'checked'
|
|
|
|
: '' ?> />
|
|
|
|
<label for="transcript-file-upload-choice"><?= lang(
|
2021-09-08 15:51:33 +00:00
|
|
|
'Common.forms.upload_file',
|
|
|
|
) ?></label>
|
2021-05-03 17:39:58 +00:00
|
|
|
|
|
|
|
<input type="radio" name="transcript-choice" id="transcript-file-remote-url-choice" aria-controls="transcript-file-remote-url-choice" value="remote-url" <?= old(
|
2021-09-08 15:51:33 +00:00
|
|
|
'transcript-choice',
|
|
|
|
) === 'remote-url'
|
2021-05-03 17:39:58 +00:00
|
|
|
? 'checked'
|
|
|
|
: '' ?> />
|
|
|
|
<label for="transcript-file-remote-url-choice"><?= lang(
|
2021-09-08 15:51:33 +00:00
|
|
|
'Common.forms.remote_url',
|
|
|
|
) ?></label>
|
2021-05-03 17:39:58 +00:00
|
|
|
|
|
|
|
<div class="py-2 tab-panels">
|
|
|
|
<section id="transcript-file-upload" class="flex items-center tab-panel">
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label class="sr-only" for="transcript_file" isOptional="true"><?= lang('Episode.form.transcript_file') ?></Forms.Label>
|
2021-05-03 17:39:58 +00:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'transcript_file',
|
|
|
|
'name' => 'transcript_file',
|
|
|
|
'class' => 'form-input',
|
|
|
|
'type' => 'file',
|
|
|
|
'accept' => '.txt,.html,.srt,.json',
|
|
|
|
]) ?>
|
|
|
|
</section>
|
|
|
|
<section id="transcript-file-remote-url" class="tab-panel">
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label class="sr-only" for="transcript_file_remote_url" isOptional="true"><?= lang('Episode.form.transcript_file_remote_url') ?></Forms.Label>
|
2021-05-03 17:39:58 +00:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'transcript_file_remote_url',
|
|
|
|
'name' => 'transcript_file_remote_url',
|
|
|
|
'class' => 'form-input w-full',
|
|
|
|
'type' => 'url',
|
|
|
|
'placeholder' => 'https://...',
|
|
|
|
'value' => old('transcript_file_remote_url'),
|
|
|
|
]) ?>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?= form_fieldset_close() ?>
|
|
|
|
|
2021-09-08 15:51:33 +00:00
|
|
|
<?= form_fieldset('', [
|
|
|
|
'class' => 'flex flex-col mb-4',
|
|
|
|
]) ?>
|
2021-05-03 17:39:58 +00:00
|
|
|
<legend><?= lang('Episode.form.chapters') .
|
|
|
|
'<small class="ml-1 lowercase">(' .
|
|
|
|
lang('Common.optional') .
|
|
|
|
')</small>' .
|
|
|
|
hint_tooltip(lang('Episode.form.chapters_hint'), 'ml-1') ?></legend>
|
|
|
|
<div class="mb-4 form-input-tabs">
|
|
|
|
<input type="radio" name="chapters-choice" id="chapters-file-upload-choice" aria-controls="chapters-file-upload-choice" value="upload-file" <?= old(
|
|
|
|
'chapters-choice',
|
|
|
|
) !== 'remote-url'
|
|
|
|
? 'checked'
|
|
|
|
: '' ?> />
|
|
|
|
<label for="chapters-file-upload-choice"><?= lang(
|
2021-09-08 15:51:33 +00:00
|
|
|
'Common.forms.upload_file',
|
|
|
|
) ?></label>
|
2021-05-03 17:39:58 +00:00
|
|
|
|
|
|
|
<input type="radio" name="chapters-choice" id="chapters-file-remote-url-choice" aria-controls="chapters-file-remote-url-choice" value="remote-url" <?= old(
|
2021-09-08 15:51:33 +00:00
|
|
|
'chapters-choice',
|
|
|
|
) === 'remote-url'
|
2021-05-03 17:39:58 +00:00
|
|
|
? 'checked'
|
|
|
|
: '' ?> />
|
|
|
|
<label for="chapters-file-remote-url-choice"><?= lang(
|
2021-09-08 15:51:33 +00:00
|
|
|
'Common.forms.remote_url',
|
|
|
|
) ?></label>
|
2021-05-03 17:39:58 +00:00
|
|
|
|
|
|
|
<div class="py-2 tab-panels">
|
|
|
|
<section id="chapters-file-upload" class="flex items-center tab-panel">
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label class="sr-only" for="chapters_file" isOptional="true"><?= lang('Episode.form.chapters_file') ?></Forms.Label>
|
2021-05-03 17:39:58 +00:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'chapters_file',
|
|
|
|
'name' => 'chapters_file',
|
|
|
|
'class' => 'form-input',
|
|
|
|
'type' => 'file',
|
|
|
|
'accept' => '.json',
|
|
|
|
]) ?>
|
|
|
|
</section>
|
|
|
|
<section id="chapters-file-remote-url" class="tab-panel">
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label class="sr-only" for="chapters_file_remote_url" isOptional="true"><?= lang('Episode.form.chapters_file_remote_url') ?></Forms.Label>
|
2021-05-03 17:39:58 +00:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'chapters_file_remote_url',
|
|
|
|
'name' => 'chapters_file_remote_url',
|
|
|
|
'class' => 'form-input w-full',
|
|
|
|
'type' => 'url',
|
|
|
|
'placeholder' => 'https://...',
|
|
|
|
'value' => old('chapters_file_remote_url'),
|
|
|
|
]) ?>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?= form_fieldset_close() ?>
|
|
|
|
|
2020-11-24 20:18:08 +00:00
|
|
|
<?= form_section_close() ?>
|
|
|
|
|
2021-03-19 16:12:36 +00:00
|
|
|
<?= form_section(
|
2021-09-08 15:51:33 +00:00
|
|
|
lang('Episode.form.advanced_section_title'),
|
|
|
|
lang('Episode.form.advanced_section_subtitle'),
|
|
|
|
) ?>
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Label for="custom_rss" hint="<?= lang('Episode.form.custom_rss_hint') ?>" isOptional="true"><?= lang('Episode.form.custom_rss') ?></Forms.Label>
|
|
|
|
<Forms.XMLEditor id="custom_rss" name="custom_rss"><?= old('custom_rss', '', false) ?></Forms.XMLEditor>
|
|
|
|
|
2021-03-19 16:12:36 +00:00
|
|
|
<?= form_section_close() ?>
|
|
|
|
|
2021-08-27 10:58:22 +00:00
|
|
|
<Forms.Toggler id="block" name="block" value="yes" checked="<?= old('block', false) ?>" hint="<?= lang('Episode.form.block_hint') ?>"><?= lang('Episode.form.block') ?></Forms.Toggler>
|
2021-04-02 17:20:02 +00:00
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= button(
|
2021-09-08 15:51:33 +00:00
|
|
|
lang('Episode.form.submit_create'),
|
|
|
|
'',
|
|
|
|
[
|
|
|
|
'variant' => 'primary',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'type' => 'submit',
|
|
|
|
'class' => 'self-end',
|
|
|
|
],
|
|
|
|
) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
|
|
|
<?= form_close() ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|