2020-07-10 14:20:25 +02:00
|
|
|
<?= $this->extend('admin/_layout') ?>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2020-07-16 12:08:23 +02:00
|
|
|
<?= $this->section('title') ?>
|
|
|
|
<?= lang('Podcast.edit') ?>
|
|
|
|
<?= $this->endSection() ?>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= $this->section('pageTitle') ?>
|
|
|
|
<?= lang('Podcast.edit') ?>
|
|
|
|
<?= $this->endSection() ?>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2020-07-16 12:08:23 +02:00
|
|
|
<?= $this->section('content') ?>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2020-08-14 20:27:57 +02:00
|
|
|
<?= form_open_multipart(route_to('podcast-edit', $podcast->id), [
|
2020-06-30 18:17:41 +02:00
|
|
|
'method' => 'post',
|
2020-10-02 17:38:16 +02:00
|
|
|
'class' => 'flex flex-col',
|
2020-06-30 18:17:41 +02:00
|
|
|
]) ?>
|
|
|
|
<?= csrf_field() ?>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_section(
|
|
|
|
lang('Podcast.form.identity_section_title'),
|
2021-04-02 19:20:02 +02:00
|
|
|
lang('Podcast.form.identity_section_subtitle'),
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
|
|
|
|
2020-09-08 13:45:17 +02:00
|
|
|
<?= form_label(lang('Podcast.form.image'), 'image') ?>
|
|
|
|
<img
|
|
|
|
src="<?= $podcast->image->thumbnail_url ?>"
|
|
|
|
alt="<?= $podcast->title ?>"
|
|
|
|
class="object-cover w-32 h-32"
|
|
|
|
/>
|
|
|
|
<?= 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-02 19:20:02 +02:00
|
|
|
'Common.forms.image_size_hint',
|
2020-09-08 13:45:17 +02:00
|
|
|
) ?></small>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2020-08-14 20:27:57 +02:00
|
|
|
<?= form_label(lang('Podcast.form.title'), 'title') ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'title',
|
|
|
|
'name' => 'title',
|
2021-04-02 19:20:02 +02:00
|
|
|
'class' => 'form-input mb-1',
|
2020-08-14 20:27:57 +02:00
|
|
|
'value' => old('title', $podcast->title),
|
|
|
|
'required' => 'required',
|
|
|
|
]) ?>
|
2021-04-02 19:20:02 +02:00
|
|
|
<span class="mb-4 text-sm"><?= $podcast->link ?></span>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2020-10-13 18:16:45 +02:00
|
|
|
<?= form_fieldset('', ['class' => 'mb-4']) ?>
|
2020-10-02 17:38:16 +02:00
|
|
|
<legend><?= lang('Podcast.form.type.label') .
|
|
|
|
hint_tooltip(lang('Podcast.form.type.hint'), 'ml-1') ?>
|
|
|
|
</legend>
|
|
|
|
<?= form_radio(
|
|
|
|
['id' => 'episodic', 'name' => 'type', 'class' => 'form-radio-btn'],
|
|
|
|
'episodic',
|
2021-04-02 19:20:02 +02:00
|
|
|
old('type') ? old('type') == 'episodic' : $podcast->type == 'episodic',
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
|
|
|
<label for="episodic"><?= lang('Podcast.form.type.episodic') ?></label>
|
|
|
|
<?= form_radio(
|
|
|
|
['id' => 'serial', 'name' => 'type', 'class' => 'form-radio-btn'],
|
|
|
|
'serial',
|
2021-04-02 19:20:02 +02:00
|
|
|
old('type') ? old('type') == 'serial' : $podcast->type == 'serial',
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
|
|
|
<label for="serial"><?= lang('Podcast.form.type.serial') ?></label>
|
|
|
|
<?= form_fieldset_close() ?>
|
|
|
|
|
2020-08-14 20:27:57 +02:00
|
|
|
<div class="mb-4">
|
|
|
|
<?= form_label(lang('Podcast.form.description'), 'description') ?>
|
|
|
|
<?= form_textarea(
|
|
|
|
[
|
|
|
|
'id' => 'description',
|
|
|
|
'name' => 'description',
|
|
|
|
'class' => 'form-textarea',
|
|
|
|
'required' => 'required',
|
|
|
|
],
|
2020-10-29 16:45:19 +01:00
|
|
|
old('description', $podcast->description_markdown, false),
|
2021-04-02 19:20:02 +02:00
|
|
|
'data-editor="markdown"',
|
2020-08-14 20:27:57 +02:00
|
|
|
) ?>
|
|
|
|
</div>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_section_close() ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?= form_section(
|
|
|
|
lang('Podcast.form.classification_section_title'),
|
2021-04-02 19:20:02 +02:00
|
|
|
lang('Podcast.form.classification_section_subtitle'),
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
2020-08-14 20:27:57 +02:00
|
|
|
|
|
|
|
<?= form_label(lang('Podcast.form.language'), 'language') ?>
|
|
|
|
<?= form_dropdown(
|
|
|
|
'language',
|
|
|
|
$languageOptions,
|
2020-10-29 16:45:19 +01:00
|
|
|
old('language', $podcast->language_code),
|
2020-08-14 20:27:57 +02:00
|
|
|
[
|
|
|
|
'id' => 'language',
|
|
|
|
'class' => 'form-select mb-4',
|
|
|
|
'required' => 'required',
|
2021-04-02 19:20:02 +02:00
|
|
|
],
|
2020-06-30 18:17:41 +02:00
|
|
|
) ?>
|
|
|
|
|
2020-08-14 20:27:57 +02:00
|
|
|
<?= form_label(lang('Podcast.form.category'), 'category') ?>
|
|
|
|
<?= form_dropdown(
|
|
|
|
'category',
|
|
|
|
$categoryOptions,
|
2020-10-02 17:38:16 +02:00
|
|
|
old('category', (string) $podcast->category_id),
|
2020-08-14 20:27:57 +02:00
|
|
|
[
|
|
|
|
'id' => 'category',
|
|
|
|
'class' => 'form-select mb-4',
|
|
|
|
'required' => 'required',
|
2021-04-02 19:20:02 +02:00
|
|
|
],
|
2020-08-14 20:27:57 +02:00
|
|
|
) ?>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_label(
|
|
|
|
lang('Podcast.form.other_categories'),
|
|
|
|
'other_categories',
|
|
|
|
[],
|
|
|
|
'',
|
2021-04-02 19:20:02 +02:00
|
|
|
true,
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
|
|
|
<?= form_multiselect(
|
|
|
|
'other_categories[]',
|
|
|
|
$categoryOptions,
|
|
|
|
old('other_categories', $podcast->other_categories_ids),
|
|
|
|
[
|
|
|
|
'id' => 'other_categories',
|
|
|
|
'class' => 'mb-4',
|
|
|
|
'data-max-item-count' => '2',
|
2021-04-02 19:20:02 +02:00
|
|
|
],
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
|
|
|
|
2020-10-13 18:16:45 +02:00
|
|
|
<?= form_fieldset('', ['class' => 'mb-4']) ?>
|
2020-10-02 17:38:16 +02:00
|
|
|
<legend><?= lang('Podcast.form.parental_advisory.label') .
|
|
|
|
hint_tooltip(lang('Podcast.form.parental_advisory.hint'), 'ml-1') ?>
|
|
|
|
</legend>
|
|
|
|
<?= form_radio(
|
|
|
|
[
|
|
|
|
'id' => 'undefined',
|
|
|
|
'name' => 'parental_advisory',
|
|
|
|
'class' => 'form-radio-btn',
|
|
|
|
],
|
|
|
|
'undefined',
|
|
|
|
old('parental_advisory')
|
|
|
|
? old('parental_advisory') === 'undefined'
|
2021-04-02 19:20:02 +02:00
|
|
|
: $podcast->parental_advisory === null,
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
|
|
|
<label for="undefined"><?= lang(
|
2021-04-02 19:20:02 +02:00
|
|
|
'Podcast.form.parental_advisory.undefined',
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?></label>
|
|
|
|
<?= form_radio(
|
|
|
|
[
|
|
|
|
'id' => 'clean',
|
|
|
|
'name' => 'parental_advisory',
|
|
|
|
'class' => 'form-radio-btn',
|
|
|
|
],
|
|
|
|
'clean',
|
|
|
|
old('parental_advisory')
|
|
|
|
? old('parental_advisory') === 'clean'
|
2021-04-02 19:20:02 +02:00
|
|
|
: $podcast->parental_advisory === 'clean',
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
|
|
|
<label for="clean"><?= lang(
|
2021-04-02 19:20:02 +02:00
|
|
|
'Podcast.form.parental_advisory.clean',
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?></label>
|
|
|
|
<?= form_radio(
|
|
|
|
[
|
|
|
|
'id' => 'explicit',
|
|
|
|
'name' => 'parental_advisory',
|
|
|
|
'class' => 'form-radio-btn',
|
|
|
|
],
|
|
|
|
'explicit',
|
|
|
|
old('parental_advisory')
|
|
|
|
? old('parental_advisory') === 'explicit'
|
2021-04-02 19:20:02 +02:00
|
|
|
: $podcast->parental_advisory === 'explicit',
|
2020-08-14 20:27:57 +02:00
|
|
|
) ?>
|
2020-10-02 17:38:16 +02:00
|
|
|
<label for="explicit"><?= lang(
|
2021-04-02 19:20:02 +02:00
|
|
|
'Podcast.form.parental_advisory.explicit',
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?></label>
|
|
|
|
<?= form_fieldset_close() ?>
|
|
|
|
|
|
|
|
<?= form_section_close() ?>
|
|
|
|
|
|
|
|
<?= form_section(
|
|
|
|
lang('Podcast.form.author_section_title'),
|
2021-04-02 19:20:02 +02:00
|
|
|
lang('Podcast.form.author_section_subtitle'),
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
2020-08-14 20:27:57 +02:00
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_label(
|
|
|
|
lang('Podcast.form.owner_name'),
|
|
|
|
'owner_name',
|
|
|
|
[],
|
2021-04-02 19:20:02 +02:00
|
|
|
lang('Podcast.form.owner_name_hint'),
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
2020-08-14 20:27:57 +02:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'owner_name',
|
|
|
|
'name' => 'owner_name',
|
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'value' => old('owner_name', $podcast->owner_name),
|
2020-08-18 18:31:28 +02:00
|
|
|
'required' => 'required',
|
2020-08-14 20:27:57 +02:00
|
|
|
]) ?>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_label(
|
|
|
|
lang('Podcast.form.owner_email'),
|
|
|
|
'owner_email',
|
|
|
|
[],
|
2021-04-02 19:20:02 +02:00
|
|
|
lang('Podcast.form.owner_email_hint'),
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
2020-08-14 20:27:57 +02:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'owner_email',
|
|
|
|
'name' => 'owner_email',
|
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'value' => old('owner_email', $podcast->owner_email),
|
|
|
|
'type' => 'email',
|
|
|
|
'required' => 'required',
|
|
|
|
]) ?>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_label(
|
|
|
|
lang('Podcast.form.publisher'),
|
|
|
|
'publisher',
|
|
|
|
[],
|
|
|
|
lang('Podcast.form.publisher_hint'),
|
2021-04-02 19:20:02 +02:00
|
|
|
true,
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
2020-08-18 18:31:28 +02:00
|
|
|
<?= form_input([
|
2020-10-02 17:38:16 +02:00
|
|
|
'id' => 'publisher',
|
|
|
|
'name' => 'publisher',
|
2020-08-18 18:31:28 +02:00
|
|
|
'class' => 'form-input mb-4',
|
2020-10-02 17:38:16 +02:00
|
|
|
'value' => old('publisher', $podcast->publisher),
|
2020-08-18 18:31:28 +02:00
|
|
|
]) ?>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_label(lang('Podcast.form.copyright'), 'copyright', [], '', true) ?>
|
2020-08-14 20:27:57 +02:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'copyright',
|
|
|
|
'name' => 'copyright',
|
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'value' => old('copyright', $podcast->copyright),
|
|
|
|
]) ?>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_section_close() ?>
|
2020-08-14 20:27:57 +02:00
|
|
|
|
2020-12-23 15:11:38 +01:00
|
|
|
<?= form_section(
|
|
|
|
lang('Podcast.form.location_section_title'),
|
2021-04-02 19:20:02 +02:00
|
|
|
lang('Podcast.form.location_section_subtitle'),
|
2020-12-23 15:11:38 +01:00
|
|
|
) ?>
|
|
|
|
|
|
|
|
<?= form_label(
|
|
|
|
lang('Podcast.form.location_name'),
|
|
|
|
'location_name',
|
|
|
|
[],
|
|
|
|
lang('Podcast.form.location_name_hint'),
|
2021-04-02 19:20:02 +02:00
|
|
|
true,
|
2020-12-23 15:11:38 +01:00
|
|
|
) ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'location_name',
|
|
|
|
'name' => 'location_name',
|
|
|
|
'class' => 'form-input mb-4',
|
2021-06-09 19:00:18 +02:00
|
|
|
'value' => old('location_name', $podcast->location_name),
|
2020-12-23 15:11:38 +01:00
|
|
|
]) ?>
|
|
|
|
<?= form_section_close() ?>
|
|
|
|
|
2020-11-26 19:53:52 +01:00
|
|
|
<?= form_section(
|
|
|
|
lang('Podcast.form.monetization_section_title'),
|
2021-04-02 19:20:02 +02:00
|
|
|
lang('Podcast.form.monetization_section_subtitle'),
|
2020-11-26 19:53:52 +01:00
|
|
|
) ?>
|
|
|
|
|
|
|
|
<?= form_label(
|
|
|
|
lang('Podcast.form.payment_pointer'),
|
|
|
|
'payment_pointer',
|
|
|
|
[],
|
2020-12-23 15:11:38 +01:00
|
|
|
lang('Podcast.form.payment_pointer_hint'),
|
2021-04-02 19:20:02 +02:00
|
|
|
true,
|
2020-11-26 19:53:52 +01:00
|
|
|
) ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'payment_pointer',
|
|
|
|
'name' => 'payment_pointer',
|
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'value' => old('payment_pointer', $podcast->payment_pointer),
|
|
|
|
]) ?>
|
2021-03-30 18:21:00 +02:00
|
|
|
|
|
|
|
<?= form_label(lang('Podcast.form.partnership')) ?>
|
|
|
|
<div class="flex flex-col mb-4 gap-x-2 gap-y-4 md:flex-row">
|
|
|
|
<div class="flex flex-col flex-shrink w-32">
|
|
|
|
<?= form_label(
|
|
|
|
lang('Podcast.form.partner_id'),
|
|
|
|
'partner_id',
|
|
|
|
[],
|
|
|
|
lang('Podcast.form.partner_id_hint'),
|
2021-04-02 19:20:02 +02:00
|
|
|
true,
|
2021-03-30 18:21:00 +02:00
|
|
|
) ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'partner_id',
|
|
|
|
'name' => 'partner_id',
|
|
|
|
'class' => 'form-input w-full',
|
|
|
|
'value' => old('partner_id', $podcast->partner_id),
|
|
|
|
]) ?>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-col flex-1">
|
|
|
|
<?= form_label(
|
|
|
|
lang('Podcast.form.partner_link_url'),
|
|
|
|
'partner_link_url',
|
|
|
|
[],
|
|
|
|
lang('Podcast.form.partner_link_url_hint'),
|
2021-04-02 19:20:02 +02:00
|
|
|
true,
|
2021-03-30 18:21:00 +02:00
|
|
|
) ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'partner_link_url',
|
|
|
|
'name' => 'partner_link_url',
|
|
|
|
'class' => 'form-input w-full',
|
|
|
|
'value' => old('partner_link_url', $podcast->partner_link_url),
|
|
|
|
]) ?>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-col flex-1">
|
|
|
|
<?= form_label(
|
|
|
|
lang('Podcast.form.partner_image_url'),
|
|
|
|
'partner_image_url',
|
|
|
|
[],
|
|
|
|
lang('Podcast.form.partner_image_url_hint'),
|
2021-04-02 19:20:02 +02:00
|
|
|
true,
|
2021-03-30 18:21:00 +02:00
|
|
|
) ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'partner_image_url',
|
|
|
|
'name' => 'partner_image_url',
|
|
|
|
'class' => 'form-input w-full',
|
|
|
|
'value' => old('partner_image_url', $podcast->partner_image_url),
|
|
|
|
]) ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-26 19:53:52 +01:00
|
|
|
<?= form_section_close() ?>
|
2020-08-14 20:27:57 +02:00
|
|
|
|
2021-03-19 17:12:36 +01:00
|
|
|
<?= form_section(
|
|
|
|
lang('Podcast.form.advanced_section_title'),
|
2021-04-02 19:20:02 +02:00
|
|
|
lang('Podcast.form.advanced_section_subtitle'),
|
2021-03-19 17:12:36 +01:00
|
|
|
) ?>
|
|
|
|
<?= form_label(
|
|
|
|
lang('Podcast.form.custom_rss'),
|
|
|
|
'custom_rss',
|
|
|
|
[],
|
|
|
|
lang('Podcast.form.custom_rss_hint'),
|
2021-04-02 19:20:02 +02:00
|
|
|
true,
|
2021-03-19 17:12:36 +01:00
|
|
|
) ?>
|
|
|
|
<?= form_textarea([
|
|
|
|
'id' => 'custom_rss',
|
|
|
|
'name' => 'custom_rss',
|
|
|
|
'class' => 'form-textarea',
|
|
|
|
'value' => old('custom_rss', $podcast->custom_rss_string),
|
|
|
|
]) ?>
|
|
|
|
<?= form_section_close() ?>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_section(
|
|
|
|
lang('Podcast.form.status_section_title'),
|
2021-04-02 19:20:02 +02:00
|
|
|
lang('Podcast.form.status_section_subtitle'),
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
|
|
|
|
|
|
|
<?= form_switch(
|
|
|
|
lang('Podcast.form.block'),
|
|
|
|
['id' => 'block', 'name' => 'block'],
|
|
|
|
'yes',
|
2020-10-29 16:45:19 +01:00
|
|
|
old('block', $podcast->is_blocked),
|
2021-04-02 19:20:02 +02:00
|
|
|
'mb-2',
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
|
|
|
|
|
|
|
<?= form_switch(
|
|
|
|
lang('Podcast.form.complete'),
|
|
|
|
['id' => 'complete', 'name' => 'complete'],
|
|
|
|
'yes',
|
2020-10-29 16:45:19 +01:00
|
|
|
old('complete', $podcast->is_completed),
|
2021-04-02 19:20:02 +02:00
|
|
|
'mb-2',
|
2020-10-20 15:46:00 +02:00
|
|
|
) ?>
|
|
|
|
|
|
|
|
<?= form_switch(
|
|
|
|
lang('Podcast.form.lock') .
|
|
|
|
hint_tooltip(lang('Podcast.form.lock_hint'), 'ml-1'),
|
|
|
|
['id' => 'lock', 'name' => 'lock'],
|
|
|
|
'yes',
|
2021-04-02 19:20:02 +02:00
|
|
|
old('lock', $podcast->is_locked),
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
|
|
|
|
|
|
|
<?= form_section_close() ?>
|
|
|
|
|
|
|
|
<?= button(
|
|
|
|
lang('Podcast.form.submit_edit'),
|
2021-05-06 16:00:48 +02:00
|
|
|
'',
|
2020-10-02 17:38:16 +02:00
|
|
|
['variant' => 'primary'],
|
2021-04-02 19:20:02 +02:00
|
|
|
['type' => 'submit', 'class' => 'self-end'],
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
|
|
|
<?= form_close() ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|