2021-09-08 15:51:33 +00:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
2021-08-27 10:58:22 +00:00
|
|
|
?>
|
|
|
|
|
2021-09-02 16:34:25 +00:00
|
|
|
<?= $this->extend('_layout') ?>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->section('title') ?>
|
|
|
|
<?= lang('Podcast.edit') ?>
|
|
|
|
<?= $this->endSection() ?>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= $this->section('pageTitle') ?>
|
|
|
|
<?= lang('Podcast.edit') ?>
|
|
|
|
<?= $this->endSection() ?>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2021-09-10 16:02:25 +00:00
|
|
|
<?= $this->section('headerRight') ?>
|
|
|
|
<Button variant="primary" type="submit" form="podcast-edit-form"><?= lang('Podcast.form.submit_edit') ?></Button>
|
|
|
|
<?= $this->endSection() ?>
|
2021-08-19 14:00:14 +00:00
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->section('content') ?>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2021-11-01 17:12:03 +00:00
|
|
|
<form id="podcast-edit-form" action="<?= route_to('podcast-edit', $podcast->id) ?>" method="POST" enctype='multipart/form-data' class="flex flex-row-reverse flex-wrap items-start justify-end gap-4">
|
2020-06-30 18:17:41 +02:00
|
|
|
<?= csrf_field() ?>
|
|
|
|
|
2021-11-05 14:36:34 +00:00
|
|
|
<div class="sticky z-40 flex flex-col w-full max-w-xs overflow-hidden shadow-sm bg-elevated border-3 border-subtle top-24 rounded-xl">
|
2021-12-14 16:41:10 +00:00
|
|
|
<?php if ($podcast->banner_id !== null): ?>
|
2021-11-05 14:36:34 +00:00
|
|
|
<a href="<?= route_to('podcast-banner-delete', $podcast->id) ?>" class="absolute p-1 text-red-700 bg-red-100 border-2 rounded-full hover:text-red-900 border-contrast focus:ring-accent top-2 right-2" title="<?= lang('Podcast.form.banner_delete') ?>" data-tooltip="bottom"><?= icon('delete-bin') ?></a>
|
2021-11-01 17:12:03 +00:00
|
|
|
<?php endif; ?>
|
2022-01-21 18:07:43 +00:00
|
|
|
<img src="<?= $podcast->banner->small_url ?>" alt="" class="w-full aspect-[3/1] bg-header" loading="lazy" />
|
2021-11-01 17:12:03 +00:00
|
|
|
<div class="flex px-4 py-2">
|
2022-03-04 14:33:48 +00:00
|
|
|
<img src="<?= $podcast->cover->thumbnail_url ?>" alt="<?= esc($podcast->title) ?>"
|
2022-01-21 18:07:43 +00:00
|
|
|
class="w-16 h-16 mr-4 -mt-8 rounded-full ring-2 ring-background-elevated aspect-square" loading="lazy" />
|
2021-11-01 17:12:03 +00:00
|
|
|
<div class="flex flex-col">
|
2022-03-04 14:33:48 +00:00
|
|
|
<p class="font-semibold leading-none"><?= esc($podcast->title) ?></p>
|
|
|
|
<p class="text-sm text-skin-muted">@<?= esc($podcast->handle) ?></p>
|
2021-11-01 17:12:03 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-01-23 16:53:23 +00:00
|
|
|
<div class="flex flex-col w-full max-w-xl gap-y-6">
|
2021-11-01 17:12:03 +00:00
|
|
|
|
2021-09-10 16:02:25 +00:00
|
|
|
<Forms.Section
|
|
|
|
title="<?= lang('Podcast.form.identity_section_title') ?>"
|
|
|
|
subtitle="<?= lang('Podcast.form.identity_section_subtitle') ?>" >
|
|
|
|
|
|
|
|
<Forms.Field
|
2021-11-01 17:12:03 +00:00
|
|
|
name="cover"
|
|
|
|
label="<?= lang('Podcast.form.cover') ?>"
|
|
|
|
helper="<?= lang('Podcast.form.cover_size_hint') ?>"
|
|
|
|
type="file"
|
|
|
|
accept=".jpg,.jpeg,.png" />
|
|
|
|
|
|
|
|
<Forms.Field
|
|
|
|
name="banner"
|
|
|
|
label="<?= lang('Podcast.form.banner') ?>"
|
|
|
|
helper="<?= lang('Podcast.form.banner_size_hint') ?>"
|
2021-09-10 16:02:25 +00:00
|
|
|
type="file"
|
|
|
|
accept=".jpg,.jpeg,.png" />
|
|
|
|
|
|
|
|
<Forms.Field
|
|
|
|
name="title"
|
|
|
|
label="<?= lang('Podcast.form.title') ?>"
|
2021-09-20 15:45:38 +00:00
|
|
|
helper="<?= $podcast->link ?>"
|
2022-03-04 14:33:48 +00:00
|
|
|
value="<?= esc($podcast->title) ?>"
|
2021-09-10 16:02:25 +00:00
|
|
|
required="true" />
|
|
|
|
|
|
|
|
<Forms.Field
|
|
|
|
as="MarkdownEditor"
|
|
|
|
name="description"
|
|
|
|
label="<?= lang('Podcast.form.description') ?>"
|
2022-03-25 14:37:14 +00:00
|
|
|
value="<?= esc($podcast->description_markdown) ?>"
|
2022-02-02 17:01:19 +00:00
|
|
|
required="true"
|
|
|
|
disallowList="header,quote" />
|
2021-09-10 16:02:25 +00:00
|
|
|
|
|
|
|
<fieldset>
|
2021-12-31 10:21:57 +00:00
|
|
|
<legend><?= lang('Podcast.form.type.label') ?></legend>
|
2021-09-10 16:02:25 +00:00
|
|
|
<div class="flex gap-2">
|
|
|
|
<Forms.RadioButton
|
|
|
|
value="episodic"
|
|
|
|
name="type"
|
2021-12-31 10:21:57 +00:00
|
|
|
hint="<?= lang('Podcast.form.type.episodic_hint') ?>"
|
2021-09-10 16:02:25 +00:00
|
|
|
isChecked="<?= $podcast->type === 'episodic' ? 'true' : 'false' ?>" ><?= lang('Podcast.form.type.episodic') ?></Forms.RadioButton>
|
|
|
|
<Forms.RadioButton
|
|
|
|
value="serial"
|
|
|
|
name="type"
|
2021-12-31 10:21:57 +00:00
|
|
|
hint="<?= lang('Podcast.form.type.serial_hint') ?>"
|
2021-09-10 16:02:25 +00:00
|
|
|
isChecked="<?= $podcast->type === 'serial' ? 'true' : 'false' ?>" ><?= lang('Podcast.form.type.serial') ?></Forms.RadioButton>
|
2021-03-30 16:21:00 +00:00
|
|
|
</div>
|
2021-09-10 16:02:25 +00:00
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
</Forms.Section>
|
|
|
|
|
|
|
|
<Forms.Section
|
|
|
|
title="<?= lang('Podcast.form.classification_section_title') ?>"
|
|
|
|
subtitle="<?= lang('Podcast.form.classification_section_subtitle') ?>" >
|
|
|
|
|
|
|
|
<Forms.Field
|
|
|
|
as="Select"
|
|
|
|
name="language"
|
|
|
|
label="<?= lang('Podcast.form.language') ?>"
|
|
|
|
selected="<?= $podcast->language_code ?>"
|
2021-09-20 15:45:38 +00:00
|
|
|
options="<?= esc(json_encode($languageOptions)) ?>"
|
|
|
|
required="true" />
|
2021-09-10 16:02:25 +00:00
|
|
|
|
|
|
|
<Forms.Field
|
|
|
|
as="Select"
|
|
|
|
name="category"
|
|
|
|
label="<?= lang('Podcast.form.category') ?>"
|
|
|
|
selected="<?= $podcast->category_id ?>"
|
2021-09-20 15:45:38 +00:00
|
|
|
options="<?= esc(json_encode($categoryOptions)) ?>"
|
|
|
|
required="true" />
|
2022-01-05 14:58:53 +00:00
|
|
|
|
2021-09-10 16:02:25 +00:00
|
|
|
<Forms.Field
|
|
|
|
as="MultiSelect"
|
|
|
|
name="other_categories[]"
|
|
|
|
label="<?= lang('Podcast.form.other_categories') ?>"
|
|
|
|
data-max-item-count="2"
|
2022-01-05 14:58:53 +00:00
|
|
|
selected="<?= esc(json_encode($podcast->other_categories_ids)) ?>"
|
2021-09-10 16:02:25 +00:00
|
|
|
options="<?= esc(json_encode($categoryOptions)) ?>" />
|
|
|
|
|
|
|
|
<fieldset class="mb-4">
|
|
|
|
<legend><?= lang('Podcast.form.parental_advisory.label') .
|
|
|
|
hint_tooltip(lang('Podcast.form.parental_advisory.hint'), 'ml-1') ?></legend>
|
|
|
|
<div class="flex gap-2">
|
|
|
|
<Forms.RadioButton
|
|
|
|
value="undefined"
|
|
|
|
name="parental_advisory"
|
|
|
|
isChecked="<?= $podcast->parental_advisory === null ? 'true' : 'false' ?>" ><?= lang('Podcast.form.parental_advisory.undefined') ?></Forms.RadioButton>
|
|
|
|
<Forms.RadioButton
|
|
|
|
value="clean"
|
|
|
|
name="parental_advisory"
|
|
|
|
isChecked="<?= $podcast->parental_advisory === 'clean' ? 'true' : 'false' ?>" ><?= lang('Podcast.form.parental_advisory.clean', ) ?></Forms.RadioButton>
|
|
|
|
<Forms.RadioButton
|
|
|
|
value="explicit"
|
|
|
|
name="parental_advisory"
|
|
|
|
isChecked="<?= $podcast->parental_advisory === 'explicit' ? 'true' : 'false' ?>" ><?= lang('Podcast.form.parental_advisory.explicit', ) ?></Forms.RadioButton>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</Forms.Section>
|
|
|
|
|
|
|
|
<Forms.Section
|
|
|
|
title="<?= lang('Podcast.form.author_section_title') ?>"
|
|
|
|
subtitle="<?= lang('Podcast.form.author_section_subtitle') ?>" >
|
|
|
|
|
|
|
|
<Forms.Field
|
|
|
|
name="owner_name"
|
|
|
|
label="<?= lang('Podcast.form.owner_name') ?>"
|
2022-03-04 14:33:48 +00:00
|
|
|
value="<?= esc($podcast->owner_name) ?>"
|
2021-09-20 15:45:38 +00:00
|
|
|
hint="<?= lang('Podcast.form.owner_name_hint') ?>"
|
2021-09-10 16:02:25 +00:00
|
|
|
required="true" />
|
|
|
|
|
|
|
|
<Forms.Field
|
|
|
|
name="owner_email"
|
|
|
|
type="email"
|
|
|
|
label="<?= lang('Podcast.form.owner_email') ?>"
|
2022-03-04 14:33:48 +00:00
|
|
|
value="<?= esc($podcast->owner_email) ?>"
|
2021-09-20 15:45:38 +00:00
|
|
|
hint="<?= lang('Podcast.form.owner_email_hint') ?>"
|
2021-09-10 16:02:25 +00:00
|
|
|
required="true" />
|
|
|
|
|
|
|
|
<Forms.Field
|
|
|
|
name="publisher"
|
|
|
|
label="<?= lang('Podcast.form.publisher') ?>"
|
2022-03-04 14:33:48 +00:00
|
|
|
value="<?= esc($podcast->publisher) ?>"
|
2021-09-20 15:45:38 +00:00
|
|
|
hint="<?= lang('Podcast.form.publisher_hint') ?>" />
|
2021-09-10 16:02:25 +00:00
|
|
|
|
|
|
|
<Forms.Field
|
|
|
|
name="copyright"
|
|
|
|
label="<?= lang('Podcast.form.copyright') ?>"
|
2022-03-04 14:33:48 +00:00
|
|
|
value="<?= esc($podcast->copyright) ?>" />
|
2021-09-10 16:02:25 +00:00
|
|
|
|
|
|
|
</Forms.Section>
|
|
|
|
|
|
|
|
<Forms.Section
|
|
|
|
title="<?= lang('Podcast.form.location_section_title') ?>"
|
|
|
|
subtitle="<?= lang('Podcast.form.location_section_subtitle') ?>" >
|
|
|
|
|
|
|
|
<Forms.Field
|
|
|
|
name="location_name"
|
|
|
|
label="<?= lang('Podcast.form.location_name') ?>"
|
2022-03-04 14:33:48 +00:00
|
|
|
value="<?= esc($podcast->location_name) ?>"
|
2021-09-20 15:45:38 +00:00
|
|
|
hint="<?= lang('Podcast.form.location_name_hint') ?>" />
|
2021-09-10 16:02:25 +00:00
|
|
|
|
|
|
|
</Forms.Section>
|
|
|
|
|
|
|
|
<Forms.Section
|
|
|
|
title="<?= lang('Podcast.form.monetization_section_title') ?>"
|
|
|
|
subtitle="<?= lang('Podcast.form.monetization_section_subtitle') ?>" >
|
|
|
|
|
|
|
|
<Forms.Field
|
|
|
|
name="payment_pointer"
|
|
|
|
label="<?= lang('Podcast.form.payment_pointer') ?>"
|
2022-03-04 14:33:48 +00:00
|
|
|
value="<?= esc($podcast->payment_pointer) ?>"
|
2021-09-20 15:45:38 +00:00
|
|
|
hint="<?= lang('Podcast.form.payment_pointer_hint') ?>" />
|
2021-09-10 16:02:25 +00:00
|
|
|
|
2021-11-05 14:36:34 +00:00
|
|
|
<fieldset class="flex flex-col items-start p-4 rounded bg-base">
|
2021-09-10 16:02:25 +00:00
|
|
|
<Heading tagName="legend" class="float-left" size="small"><?= lang('Podcast.form.partnership') ?></Heading>
|
|
|
|
<div class="flex flex-col w-full clear-left gap-x-2 gap-y-4 md:flex-row">
|
|
|
|
<div class="flex flex-col flex-shrink w-32">
|
|
|
|
<Forms.Label for="partner_id" hint="<?= lang('Podcast.form.partner_id_hint') ?>" isOptional="true"><?= lang('Podcast.form.partner_id') ?></Forms.Label>
|
2022-03-04 14:33:48 +00:00
|
|
|
<Forms.Input name="partner_id" value="<?= esc($podcast->partner_id) ?>" />
|
2021-09-10 16:02:25 +00:00
|
|
|
</div>
|
|
|
|
<div class="flex flex-col flex-1">
|
|
|
|
<Forms.Label for="partner_link_url" hint="<?= lang('Podcast.form.partner_link_url_hint') ?>" isOptional="true"><?= lang('Podcast.form.partner_link_url') ?></Forms.Label>
|
2022-03-04 14:33:48 +00:00
|
|
|
<Forms.Input name="partner_link_url" value="<?= esc($podcast->partner_link_url) ?>" />
|
2021-09-10 16:02:25 +00:00
|
|
|
</div>
|
2021-03-30 16:21:00 +00:00
|
|
|
</div>
|
2021-09-10 16:02:25 +00:00
|
|
|
<div class="flex flex-col w-full mt-2">
|
|
|
|
<Forms.Label for="partner_image_url" hint="<?= lang('Podcast.form.partner_image_url_hint') ?>" isOptional="true"><?= lang('Podcast.form.partner_image_url') ?></Forms.Label>
|
2022-03-04 14:33:48 +00:00
|
|
|
<Forms.Input name="partner_image_url" value="<?= esc($podcast->partner_image_url) ?>" />
|
2021-03-30 16:21:00 +00:00
|
|
|
</div>
|
2021-09-10 16:02:25 +00:00
|
|
|
</fieldset>
|
|
|
|
</Forms.Section>
|
|
|
|
|
|
|
|
<Forms.Section
|
|
|
|
title="<?= lang('Podcast.form.advanced_section_title') ?>"
|
|
|
|
subtitle="<?= lang('Podcast.form.advanced_section_subtitle') ?>" >
|
|
|
|
|
|
|
|
<Forms.Field
|
|
|
|
as="XMLEditor"
|
|
|
|
name="custom_rss"
|
|
|
|
label="<?= lang('Podcast.form.custom_rss') ?>"
|
2022-01-23 16:53:23 +00:00
|
|
|
hint="<?= lang('Podcast.form.custom_rss_hint') ?>"
|
|
|
|
content="<?= esc($podcast->custom_rss_string) ?>" />
|
2021-09-10 16:02:25 +00:00
|
|
|
|
2022-02-09 17:44:24 +00:00
|
|
|
<Forms.Field
|
|
|
|
name="new_feed_url"
|
|
|
|
type="url"
|
|
|
|
label="<?= lang('Podcast.form.new_feed_url') ?>"
|
|
|
|
hint="<?= lang('Podcast.form.new_feed_url_hint') ?>"
|
2022-03-04 14:33:48 +00:00
|
|
|
value="<?= esc($podcast->new_feed_url) ?>"
|
2022-02-09 17:44:24 +00:00
|
|
|
/>
|
|
|
|
|
2021-09-10 16:02:25 +00:00
|
|
|
</Forms.Section>
|
|
|
|
|
|
|
|
<Forms.Section
|
2021-09-15 15:58:21 +00:00
|
|
|
title="<?= lang('Podcast.form.status_section_title') ?>" >
|
|
|
|
<Forms.Toggler class="mb-2" name="lock" value="yes" checked="<?= $podcast->is_locked ? 'true' : 'false' ?>" hint="<?= lang('Podcast.form.lock_hint') ?>">
|
2021-09-10 16:02:25 +00:00
|
|
|
<?= lang('Podcast.form.lock') ?>
|
|
|
|
</Forms.Toggler>
|
2021-09-15 15:58:21 +00:00
|
|
|
<Forms.Toggler class="mb-2" name="block" value="yes" checked="<?= $podcast->is_blocked ? 'true' : 'false' ?>">
|
2021-09-10 16:02:25 +00:00
|
|
|
<?= lang('Podcast.form.block') ?>
|
|
|
|
</Forms.Toggler>
|
2021-09-15 15:58:21 +00:00
|
|
|
<Forms.Toggler name="complete" value="yes" checked="<?= $podcast->is_completed ? 'true' : 'false' ?>">
|
2021-09-10 16:02:25 +00:00
|
|
|
<?= lang('Podcast.form.complete') ?>
|
|
|
|
</Forms.Toggler>
|
|
|
|
</Forms.Section>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
2021-11-01 17:12:03 +00:00
|
|
|
<Button variant="primary" type="submit" class="self-end"><?= lang('Podcast.form.submit_edit') ?></Button>
|
|
|
|
</div>
|
|
|
|
|
2021-09-15 15:58:21 +00:00
|
|
|
</form>
|
2020-06-30 18:17:41 +02:00
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|