fix(episode-form): show warning to set `memory_limit`, `upload_max_filesize` & `post_max_size`

remove undefined "my-podcasts" route

closes #5, #86
This commit is contained in:
Yassine Doghri 2021-04-08 10:45:58 +00:00
parent c37a4af2d8
commit 3b3c218b9c
7 changed files with 85 additions and 75 deletions

View File

@ -90,10 +90,6 @@ $routes->group(
'as' => 'admin', 'as' => 'admin',
]); ]);
$routes->get('my-podcasts', 'Podcast::myPodcasts', [
'as' => 'my-podcasts',
]);
$routes->group('persons', function ($routes) { $routes->group('persons', function ($routes) {
$routes->get('/', 'Person', [ $routes->get('/', 'Person', [
'as' => 'person-list', 'as' => 'person-list',

View File

@ -111,8 +111,8 @@ class Episode extends BaseController
'enclosure' => 'uploaded[enclosure]|ext_in[enclosure,mp3,m4a]', 'enclosure' => 'uploaded[enclosure]|ext_in[enclosure,mp3,m4a]',
'image' => 'image' =>
'is_image[image]|ext_in[image,jpg,png]|min_dims[image,1400,1400]|is_image_squared[image]', 'is_image[image]|ext_in[image,jpg,png]|min_dims[image,1400,1400]|is_image_squared[image]',
'transcript' => 'ext_in[transcript,txt,html,srt,json]', 'transcript' => 'ext_in[transcript,txt,html,srt,json]|permit_empty',
'chapters' => 'ext_in[chapters,json]', 'chapters' => 'ext_in[chapters,json]|permit_empty',
]; ];
if (!$this->validate($rules)) { if (!$this->validate($rules)) {
@ -205,8 +205,8 @@ class Episode extends BaseController
'uploaded[enclosure]|ext_in[enclosure,mp3,m4a]|permit_empty', 'uploaded[enclosure]|ext_in[enclosure,mp3,m4a]|permit_empty',
'image' => 'image' =>
'is_image[image]|ext_in[image,jpg,png]|min_dims[image,1400,1400]|is_image_squared[image]', 'is_image[image]|ext_in[image,jpg,png]|min_dims[image,1400,1400]|is_image_squared[image]',
'transcript' => 'ext_in[transcript,txt,html,srt,json]', 'transcript' => 'ext_in[transcript,txt,html,srt,json]|permit_empty',
'chapters' => 'ext_in[chapters,json]', 'chapters' => 'ext_in[chapters,json]|permit_empty',
]; ];
if (!$this->validate($rules)) { if (!$this->validate($rules)) {

View File

@ -43,6 +43,8 @@ return [
'not_published' => 'Not published', 'not_published' => 'Not published',
], ],
'form' => [ 'form' => [
'warning' =>
'In case of fatal error, try increasing the `memory_limit`, `upload_max_filesize` and `post_max_size` values in your php configuration file then restart your web server.<br />These values must be higher than the audio file you wish to upload.',
'enclosure' => 'Audio file', 'enclosure' => 'Audio file',
'enclosure_hint' => 'Choose an .mp3 or .m4a audio file.', 'enclosure_hint' => 'Choose an .mp3 or .m4a audio file.',
'info_section_title' => 'Episode info', 'info_section_title' => 'Episode info',

View File

@ -43,6 +43,8 @@ return [
'not_published' => 'Non publié', 'not_published' => 'Non publié',
], ],
'form' => [ 'form' => [
'warning' =>
'En cas derreur fatale, essayez daugmenter les valeurs de `memory_limit`, `upload_max_filesize` et `post_max_size` dans votre fichier de configuration php puis redémarrez votre serveur web.<br />Les valeurs doivent être plus grandes que le fichier audio que vous souhaitez téléverser.',
'enclosure' => 'Fichier audio', 'enclosure' => 'Fichier audio',
'enclosure_hint' => 'Sélectionnez un fichier audio .mp3 ou .m4a.', 'enclosure_hint' => 'Sélectionnez un fichier audio .mp3 ou .m4a.',
'info_section_title' => 'Informations épisode', 'info_section_title' => 'Informations épisode',

View File

@ -18,16 +18,21 @@
<?= csrf_field() ?> <?= csrf_field() ?>
<?= form_hidden('client_timezone', 'UTC') ?> <?= form_hidden('client_timezone', 'UTC') ?>
<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>
<?= form_section( <?= form_section(
lang('Episode.form.info_section_title'), lang('Episode.form.info_section_title'),
lang('Episode.form.info_section_subtitle') lang('Episode.form.info_section_subtitle'),
) ?> ) ?>
<?= form_label( <?= form_label(
lang('Episode.form.enclosure'), lang('Episode.form.enclosure'),
'enclosure', 'enclosure',
[], [],
lang('Episode.form.enclosure_hint') lang('Episode.form.enclosure_hint'),
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'enclosure', 'id' => 'enclosure',
@ -43,7 +48,7 @@
'image', 'image',
[], [],
lang('Episode.form.image_hint'), lang('Episode.form.image_hint'),
true true,
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'image', 'id' => 'image',
@ -53,14 +58,14 @@
'accept' => '.jpg,.jpeg,.png', 'accept' => '.jpg,.jpeg,.png',
]) ?> ]) ?>
<small class="mb-4 text-gray-600"><?= lang( <small class="mb-4 text-gray-600"><?= lang(
'Common.forms.image_size_hint' 'Common.forms.image_size_hint',
) ?></small> ) ?></small>
<?= form_label( <?= form_label(
lang('Episode.form.title'), lang('Episode.form.title'),
'title', 'title',
[], [],
lang('Episode.form.title_hint') lang('Episode.form.title_hint'),
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'title', 'id' => 'title',
@ -75,7 +80,7 @@
lang('Episode.form.slug'), lang('Episode.form.slug'),
'slug', 'slug',
[], [],
lang('Episode.form.slug_hint') lang('Episode.form.slug_hint'),
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'slug', 'id' => 'slug',
@ -118,7 +123,7 @@
<?= form_radio( <?= form_radio(
['id' => 'full', 'name' => 'type', 'class' => 'form-radio-btn'], ['id' => 'full', 'name' => 'type', 'class' => 'form-radio-btn'],
'full', 'full',
old('type') ? old('type') == 'full' : true old('type') ? old('type') == 'full' : true,
) ?> ) ?>
<label for="full" class="inline-flex items-center"> <label for="full" class="inline-flex items-center">
<?= lang('Episode.form.type.full') ?> <?= lang('Episode.form.type.full') ?>
@ -126,7 +131,7 @@
<?= form_radio( <?= form_radio(
['id' => 'trailer', 'name' => 'type', 'class' => 'form-radio-btn'], ['id' => 'trailer', 'name' => 'type', 'class' => 'form-radio-btn'],
'trailer', 'trailer',
old('type') ? old('type') == 'trailer' : false old('type') ? old('type') == 'trailer' : false,
) ?> ) ?>
<label for="trailer" class="inline-flex items-center"> <label for="trailer" class="inline-flex items-center">
<?= lang('Episode.form.type.trailer') ?> <?= lang('Episode.form.type.trailer') ?>
@ -134,7 +139,7 @@
<?= form_radio( <?= form_radio(
['id' => 'bonus', 'name' => 'type', 'class' => 'form-radio-btn'], ['id' => 'bonus', 'name' => 'type', 'class' => 'form-radio-btn'],
'bonus', 'bonus',
old('type') ? old('type') == 'bonus' : false old('type') ? old('type') == 'bonus' : false,
) ?> ) ?>
<label for="bonus" class="inline-flex items-center"> <label for="bonus" class="inline-flex items-center">
<?= lang('Episode.form.type.bonus') ?> <?= lang('Episode.form.type.bonus') ?>
@ -155,10 +160,10 @@
'undefined', 'undefined',
old('parental_advisory') old('parental_advisory')
? old('parental_advisory') === 'undefined' ? old('parental_advisory') === 'undefined'
: true : true,
) ?> ) ?>
<label for="undefined"><?= lang( <label for="undefined"><?= lang(
'Episode.form.parental_advisory.undefined' 'Episode.form.parental_advisory.undefined',
) ?></label> ) ?></label>
<?= form_radio( <?= form_radio(
[ [
@ -167,10 +172,10 @@
'class' => 'form-radio-btn', 'class' => 'form-radio-btn',
], ],
'clean', 'clean',
old('parental_advisory') ? old('parental_advisory') === 'clean' : false old('parental_advisory') ? old('parental_advisory') === 'clean' : false,
) ?> ) ?>
<label for="clean"><?= lang( <label for="clean"><?= lang(
'Episode.form.parental_advisory.clean' 'Episode.form.parental_advisory.clean',
) ?></label> ) ?></label>
<?= form_radio( <?= form_radio(
[ [
@ -181,10 +186,10 @@
'explicit', 'explicit',
old('parental_advisory') old('parental_advisory')
? old('parental_advisory') === 'explicit' ? old('parental_advisory') === 'explicit'
: false : false,
) ?> ) ?>
<label for="explicit"><?= lang( <label for="explicit"><?= lang(
'Episode.form.parental_advisory.explicit' 'Episode.form.parental_advisory.explicit',
) ?></label> ) ?></label>
<?= form_fieldset_close() ?> <?= form_fieldset_close() ?>
@ -193,7 +198,7 @@
<?= form_section( <?= form_section(
lang('Episode.form.show_notes_section_title'), lang('Episode.form.show_notes_section_title'),
lang('Episode.form.show_notes_section_subtitle') lang('Episode.form.show_notes_section_subtitle'),
) ?> ) ?>
<div class="mb-4"> <div class="mb-4">
@ -206,7 +211,7 @@
'required' => 'required', 'required' => 'required',
], ],
old('description', '', false), old('description', '', false),
'data-editor="markdown"' 'data-editor="markdown"',
) ?> ) ?>
</div> </div>
@ -215,7 +220,7 @@
lang('Episode.form.description_footer'), lang('Episode.form.description_footer'),
'description_footer', 'description_footer',
[], [],
lang('Episode.form.description_footer_hint') lang('Episode.form.description_footer_hint'),
) ?> ) ?>
<?= form_textarea( <?= form_textarea(
[ [
@ -226,9 +231,9 @@
old( old(
'description_footer', 'description_footer',
$podcast->episode_description_footer_markdown ?? '', $podcast->episode_description_footer_markdown ?? '',
false false,
), ),
'data-editor="markdown"' 'data-editor="markdown"',
) ?> ) ?>
</div> </div>
@ -236,7 +241,7 @@
<?= form_section( <?= form_section(
lang('Episode.form.location_section_title'), lang('Episode.form.location_section_title'),
lang('Episode.form.location_section_subtitle') lang('Episode.form.location_section_subtitle'),
) ?> ) ?>
<?= form_label( <?= form_label(
@ -244,7 +249,7 @@
'location_name', 'location_name',
[], [],
lang('Episode.form.location_name_hint'), lang('Episode.form.location_name_hint'),
true true,
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'location_name', 'id' => 'location_name',
@ -256,14 +261,14 @@
<?= form_section( <?= form_section(
lang('Episode.form.additional_files_section_title'), lang('Episode.form.additional_files_section_title'),
lang('Episode.form.additional_files_section_subtitle') lang('Episode.form.additional_files_section_subtitle'),
) ?> ) ?>
<?= form_label( <?= form_label(
lang('Episode.form.transcript'), lang('Episode.form.transcript'),
'transcript', 'transcript',
[], [],
lang('Episode.form.transcript_hint'), lang('Episode.form.transcript_hint'),
true true,
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'transcript', 'id' => 'transcript',
@ -277,7 +282,7 @@
'chapters', 'chapters',
[], [],
lang('Episode.form.chapters_hint'), lang('Episode.form.chapters_hint'),
true true,
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'chapters', 'id' => 'chapters',
@ -290,14 +295,14 @@
<?= form_section( <?= form_section(
lang('Episode.form.advanced_section_title'), lang('Episode.form.advanced_section_title'),
lang('Episode.form.advanced_section_subtitle') lang('Episode.form.advanced_section_subtitle'),
) ?> ) ?>
<?= form_label( <?= form_label(
lang('Episode.form.custom_rss'), lang('Episode.form.custom_rss'),
'custom_rss', 'custom_rss',
[], [],
lang('Episode.form.custom_rss_hint'), lang('Episode.form.custom_rss_hint'),
true true,
) ?> ) ?>
<?= form_textarea([ <?= form_textarea([
'id' => 'custom_rss', 'id' => 'custom_rss',
@ -312,14 +317,14 @@
hint_tooltip(lang('Episode.form.block_hint'), 'ml-1'), hint_tooltip(lang('Episode.form.block_hint'), 'ml-1'),
['id' => 'block', 'name' => 'block'], ['id' => 'block', 'name' => 'block'],
'yes', 'yes',
old('block', false) old('block', false),
) ?> ) ?>
<?= button( <?= button(
lang('Episode.form.submit_create'), lang('Episode.form.submit_create'),
null, null,
['variant' => 'primary'], ['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'] ['type' => 'submit', 'class' => 'self-end'],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -17,16 +17,21 @@
]) ?> ]) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
<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>
<?= form_section( <?= form_section(
lang('Episode.form.info_section_title'), lang('Episode.form.info_section_title'),
lang('Episode.form.info_section_subtitle') lang('Episode.form.info_section_subtitle'),
) ?> ) ?>
<?= form_label( <?= form_label(
lang('Episode.form.enclosure'), lang('Episode.form.enclosure'),
'enclosure', 'enclosure',
[], [],
lang('Episode.form.enclosure_hint') lang('Episode.form.enclosure_hint'),
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'enclosure', 'id' => 'enclosure',
@ -41,7 +46,7 @@
'image', 'image',
[], [],
lang('Episode.form.image_hint'), lang('Episode.form.image_hint'),
true true,
) ?> ) ?>
<img <img
src="<?= $episode->image->thumbnail_url ?>" src="<?= $episode->image->thumbnail_url ?>"
@ -51,19 +56,20 @@
<?= form_input([ <?= form_input([
'id' => 'image', 'id' => 'image',
'name' => 'image', 'name' => 'image',
'class' => 'form-input', 'class' => 'form-input',
'type' => 'file', 'type' => 'file',
'accept' => '.jpg,.jpeg,.png', 'accept' => '.jpg,.jpeg,.png',
]) ?> ]) ?>
<small class="mb-4 text-gray-600"><?= lang( <small class="mb-4 text-gray-600"><?= lang(
'Common.forms.image_size_hint' 'Common.forms.image_size_hint',
) ?></small> ) ?></small>
<?= form_label( <?= form_label(
lang('Episode.form.title'), lang('Episode.form.title'),
'title', 'title',
[], [],
lang('Episode.form.title_hint') lang('Episode.form.title_hint'),
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'title', 'id' => 'title',
@ -78,7 +84,7 @@
lang('Episode.form.slug'), lang('Episode.form.slug'),
'slug', 'slug',
[], [],
lang('Episode.form.slug_hint') lang('Episode.form.slug_hint'),
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'slug', 'id' => 'slug',
@ -120,7 +126,7 @@
<?= form_radio( <?= form_radio(
['id' => 'full', 'name' => 'type', 'class' => 'form-radio-btn'], ['id' => 'full', 'name' => 'type', 'class' => 'form-radio-btn'],
'full', 'full',
old('type') ? old('type') === 'full' : $episode->type === 'full' old('type') ? old('type') === 'full' : $episode->type === 'full',
) ?> ) ?>
<label for="full" class="inline-flex items-center"> <label for="full" class="inline-flex items-center">
<?= lang('Episode.form.type.full') ?> <?= lang('Episode.form.type.full') ?>
@ -128,7 +134,7 @@
<?= form_radio( <?= form_radio(
['id' => 'trailer', 'name' => 'type', 'class' => 'form-radio-btn'], ['id' => 'trailer', 'name' => 'type', 'class' => 'form-radio-btn'],
'trailer', 'trailer',
old('type') ? old('type') === 'trailer' : $episode->type === 'trailer' old('type') ? old('type') === 'trailer' : $episode->type === 'trailer',
) ?> ) ?>
<label for="trailer" class="inline-flex items-center"> <label for="trailer" class="inline-flex items-center">
<?= lang('Episode.form.type.trailer') ?> <?= lang('Episode.form.type.trailer') ?>
@ -136,7 +142,7 @@
<?= form_radio( <?= form_radio(
['id' => 'bonus', 'name' => 'type', 'class' => 'form-radio-btn'], ['id' => 'bonus', 'name' => 'type', 'class' => 'form-radio-btn'],
'bonus', 'bonus',
old('type') ? old('type') === 'bonus' : $episode->type === 'bonus' old('type') ? old('type') === 'bonus' : $episode->type === 'bonus',
) ?> ) ?>
<label for="bonus" class="inline-flex items-center"> <label for="bonus" class="inline-flex items-center">
<?= lang('Episode.form.type.bonus') ?> <?= lang('Episode.form.type.bonus') ?>
@ -157,10 +163,10 @@
'undefined', 'undefined',
old('parental_advisory') old('parental_advisory')
? old('parental_advisory') === 'undefined' ? old('parental_advisory') === 'undefined'
: $episode->parental_advisory === null : $episode->parental_advisory === null,
) ?> ) ?>
<label for="undefined"><?= lang( <label for="undefined"><?= lang(
'Episode.form.parental_advisory.undefined' 'Episode.form.parental_advisory.undefined',
) ?></label> ) ?></label>
<?= form_radio( <?= form_radio(
[ [
@ -171,10 +177,10 @@
'clean', 'clean',
old('parental_advisory') old('parental_advisory')
? old('parental_advisory') === 'clean' ? old('parental_advisory') === 'clean'
: $episode->parental_advisory === 'clean' : $episode->parental_advisory === 'clean',
) ?> ) ?>
<label for="clean"><?= lang( <label for="clean"><?= lang(
'Episode.form.parental_advisory.clean' 'Episode.form.parental_advisory.clean',
) ?></label> ) ?></label>
<?= form_radio( <?= form_radio(
[ [
@ -185,10 +191,10 @@
'explicit', 'explicit',
old('parental_advisory') old('parental_advisory')
? old('parental_advisory') === 'explicit' ? old('parental_advisory') === 'explicit'
: $episode->parental_advisory === 'explicit' : $episode->parental_advisory === 'explicit',
) ?> ) ?>
<label for="explicit"><?= lang( <label for="explicit"><?= lang(
'Episode.form.parental_advisory.explicit' 'Episode.form.parental_advisory.explicit',
) ?></label> ) ?></label>
<?= form_fieldset_close() ?> <?= form_fieldset_close() ?>
@ -197,7 +203,7 @@
<?= form_section( <?= form_section(
lang('Episode.form.show_notes_section_title'), lang('Episode.form.show_notes_section_title'),
lang('Episode.form.show_notes_section_subtitle') lang('Episode.form.show_notes_section_subtitle'),
) ?> ) ?>
<div class="mb-4"> <div class="mb-4">
@ -210,7 +216,7 @@
'required' => 'required', 'required' => 'required',
], ],
old('description', $episode->description_markdown, false), old('description', $episode->description_markdown, false),
'data-editor="markdown"' 'data-editor="markdown"',
) ?> ) ?>
</div> </div>
@ -219,7 +225,7 @@
lang('Episode.form.description_footer'), lang('Episode.form.description_footer'),
'description_footer', 'description_footer',
[], [],
lang('Episode.form.description_footer_hint') lang('Episode.form.description_footer_hint'),
) ?> ) ?>
<?= form_textarea( <?= form_textarea(
[ [
@ -230,9 +236,9 @@
old( old(
'description_footer', 'description_footer',
$podcast->episode_description_footer_markdown ?? '', $podcast->episode_description_footer_markdown ?? '',
false false,
), ),
'data-editor="markdown"' 'data-editor="markdown"',
) ?> ) ?>
</div> </div>
@ -240,7 +246,7 @@
<?= form_section( <?= form_section(
lang('Episode.form.location_section_title'), lang('Episode.form.location_section_title'),
lang('Episode.form.location_section_subtitle') lang('Episode.form.location_section_subtitle'),
) ?> ) ?>
<?= form_label( <?= form_label(
@ -248,7 +254,7 @@
'location_name', 'location_name',
[], [],
lang('Episode.form.location_name_hint'), lang('Episode.form.location_name_hint'),
true true,
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'location_name', 'id' => 'location_name',
@ -264,7 +270,7 @@
lang('Episode.form.additional_files_section_subtitle', [ lang('Episode.form.additional_files_section_subtitle', [
'podcastNamespaceLink' => 'podcastNamespaceLink' =>
'“<a href="https://github.com/Podcastindex-org/podcast-namespace" target="_blank" rel="noreferrer noopener" style="text-decoration: underline;">podcast namespace</a>”', '“<a href="https://github.com/Podcastindex-org/podcast-namespace" target="_blank" rel="noreferrer noopener" style="text-decoration: underline;">podcast namespace</a>”',
]) ]),
) ?> ) ?>
<div class="flex flex-col flex-1"> <div class="flex flex-col flex-1">
<?= form_label( <?= form_label(
@ -272,7 +278,7 @@
'transcript', 'transcript',
[], [],
lang('Episode.form.transcript_hint'), lang('Episode.form.transcript_hint'),
true true,
) ?> ) ?>
<?php if ($episode->transcript): ?> <?php if ($episode->transcript): ?>
<div class="flex justify-between"> <div class="flex justify-between">
@ -283,7 +289,7 @@
'class' => 'inline-flex items-center text-xs', 'class' => 'inline-flex items-center text-xs',
'target' => '_blank', 'target' => '_blank',
'rel' => 'noreferrer noopener', 'rel' => 'noreferrer noopener',
] ],
) . ) .
anchor( anchor(
route_to('transcript-delete', $podcast->id, $episode->id), route_to('transcript-delete', $podcast->id, $episode->id),
@ -294,7 +300,7 @@
'data-toggle' => 'tooltip', 'data-toggle' => 'tooltip',
'data-placement' => 'bottom', 'data-placement' => 'bottom',
'title' => lang('Episode.form.transcript_delete'), 'title' => lang('Episode.form.transcript_delete'),
] ],
) ?> ) ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
@ -312,7 +318,7 @@
'chapters', 'chapters',
[], [],
lang('Episode.form.chapters_hint'), lang('Episode.form.chapters_hint'),
true true,
) ?> ) ?>
<?php if ($episode->chapters): ?> <?php if ($episode->chapters): ?>
<div class="flex justify-between"> <div class="flex justify-between">
@ -323,7 +329,7 @@
'class' => 'inline-flex items-center text-xs', 'class' => 'inline-flex items-center text-xs',
'target' => '_blank', 'target' => '_blank',
'rel' => 'noreferrer noopener', 'rel' => 'noreferrer noopener',
] ],
) . ) .
anchor( anchor(
route_to('chapters-delete', $podcast->id, $episode->id), route_to('chapters-delete', $podcast->id, $episode->id),
@ -334,7 +340,7 @@
'data-toggle' => 'tooltip', 'data-toggle' => 'tooltip',
'data-placement' => 'bottom', 'data-placement' => 'bottom',
'title' => lang('Episode.form.chapters_delete'), 'title' => lang('Episode.form.chapters_delete'),
] ],
) ?> ) ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
@ -350,14 +356,14 @@
<?= form_section( <?= form_section(
lang('Episode.form.advanced_section_title'), lang('Episode.form.advanced_section_title'),
lang('Episode.form.advanced_section_subtitle') lang('Episode.form.advanced_section_subtitle'),
) ?> ) ?>
<?= form_label( <?= form_label(
lang('Episode.form.custom_rss'), lang('Episode.form.custom_rss'),
'custom_rss', 'custom_rss',
[], [],
lang('Episode.form.custom_rss_hint'), lang('Episode.form.custom_rss_hint'),
true true,
) ?> ) ?>
<?= form_textarea([ <?= form_textarea([
'id' => 'custom_rss', 'id' => 'custom_rss',
@ -372,14 +378,14 @@
hint_tooltip(lang('Episode.form.block_hint'), 'ml-1'), hint_tooltip(lang('Episode.form.block_hint'), 'ml-1'),
['id' => 'block', 'name' => 'block'], ['id' => 'block', 'name' => 'block'],
'yes', 'yes',
old('block', $episode->is_blocked) old('block', $episode->is_blocked),
) ?> ) ?>
<?= button( <?= button(
lang('Episode.form.submit_edit'), lang('Episode.form.submit_edit'),
null, null,
['variant' => 'primary'], ['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'] ['type' => 'submit', 'class' => 'self-end'],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -16,6 +16,10 @@
]) ?> ]) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
<div class="inline-flex w-full p-2 mb-6 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('PodcastImport.warning') ?>
</div>
<?= form_section( <?= form_section(
lang('PodcastImport.old_podcast_section_title'), lang('PodcastImport.old_podcast_section_title'),
@ -215,11 +219,6 @@
<?= form_section_close() ?> <?= form_section_close() ?>
<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('PodcastImport.warning') ?>
</div>
<?= button( <?= button(
lang('PodcastImport.submit'), lang('PodcastImport.submit'),
null, null,