2021-09-02 18:34:25 +02:00
|
|
|
<?= $this->extend('_layout') ?>
|
2020-08-21 10:41:09 +02:00
|
|
|
|
|
|
|
<?= $this->section('title') ?>
|
|
|
|
<?= lang('Podcast.import') ?>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= $this->section('pageTitle') ?>
|
|
|
|
<?= lang('Podcast.import') ?>
|
|
|
|
<?= $this->endSection() ?>
|
2020-08-21 10:41:09 +02:00
|
|
|
|
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_open_multipart(route_to('podcast-import'), [
|
2020-08-21 10:41:09 +02:00
|
|
|
'method' => 'post',
|
2020-10-02 17:38:16 +02:00
|
|
|
'class' => 'flex flex-col items-start',
|
2020-08-21 10:41:09 +02:00
|
|
|
]) ?>
|
|
|
|
<?= csrf_field() ?>
|
|
|
|
|
2021-04-08 12:45:58 +02:00
|
|
|
<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>
|
2020-10-06 19:20:23 +02:00
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_section(
|
|
|
|
lang('PodcastImport.old_podcast_section_title'),
|
2020-10-06 19:20:23 +02:00
|
|
|
icon('scales', 'mr-2 text-lg flex-shrink-0') .
|
|
|
|
lang('PodcastImport.old_podcast_section_subtitle'),
|
|
|
|
[],
|
2021-04-02 19:20:02 +02:00
|
|
|
'inline-flex text-xs p-2 text-blue-800 font-semibold bg-blue-100 border border-blue-300 rounded',
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
2020-08-21 10:41:09 +02:00
|
|
|
|
2020-09-08 13:45:17 +02:00
|
|
|
<?= form_label(
|
2020-10-02 17:38:16 +02:00
|
|
|
lang('PodcastImport.imported_feed_url'),
|
|
|
|
'imported_feed_url',
|
|
|
|
[],
|
2021-04-02 19:20:02 +02:00
|
|
|
lang('PodcastImport.imported_feed_url_hint'),
|
2020-09-08 13:45:17 +02:00
|
|
|
) ?>
|
|
|
|
<?= form_input([
|
|
|
|
'id' => 'imported_feed_url',
|
|
|
|
'name' => 'imported_feed_url',
|
2020-10-02 17:38:16 +02:00
|
|
|
'class' => 'form-input',
|
2020-09-08 13:45:17 +02:00
|
|
|
'value' => old('imported_feed_url'),
|
2020-10-02 17:38:16 +02:00
|
|
|
'placeholder' => 'https://...',
|
2020-09-08 13:45:17 +02:00
|
|
|
'type' => 'url',
|
|
|
|
'required' => 'required',
|
|
|
|
]) ?>
|
2020-08-21 10:41:09 +02:00
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_section_close() ?>
|
|
|
|
|
|
|
|
|
2020-10-06 19:20:23 +02:00
|
|
|
<?= form_section(lang('PodcastImport.new_podcast_section_title'), '') ?>
|
2020-10-02 17:38:16 +02:00
|
|
|
|
|
|
|
<?= form_label(
|
2021-07-26 15:10:46 +02:00
|
|
|
lang('Podcast.form.handle'),
|
|
|
|
'handle',
|
2020-10-02 17:38:16 +02:00
|
|
|
[],
|
2021-07-26 15:10:46 +02:00
|
|
|
lang('Podcast.form.handle_hint'),
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
2021-07-26 15:10:46 +02:00
|
|
|
<div class="relative mb-4">
|
2021-07-26 19:33:34 +02:00
|
|
|
<?= icon('at', 'absolute text-xl h-full inset-0 text-gray-400 left-3') ?>
|
2021-07-26 15:10:46 +02:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'handle',
|
|
|
|
'name' => 'handle',
|
|
|
|
'class' => 'form-input w-full pl-8',
|
|
|
|
'value' => old('handle'),
|
|
|
|
'required' => 'required',
|
|
|
|
]) ?>
|
|
|
|
</div>
|
2020-10-02 17:38:16 +02:00
|
|
|
|
2020-08-21 10:41:09 +02:00
|
|
|
<?= form_label(lang('Podcast.form.language'), 'language') ?>
|
2021-07-29 11:41:36 +02:00
|
|
|
<?= form_dropdown('language', $languageOptions, [old('language', $browserLang)], [
|
2020-08-21 10:41:09 +02:00
|
|
|
'id' => 'language',
|
|
|
|
'class' => 'form-select mb-4',
|
|
|
|
'required' => 'required',
|
|
|
|
]) ?>
|
|
|
|
|
|
|
|
<?= form_label(lang('Podcast.form.category'), 'category') ?>
|
2021-07-29 11:41:36 +02:00
|
|
|
<?= form_dropdown('category', $categoryOptions, [old('category', '')], [
|
2020-08-21 10:41:09 +02:00
|
|
|
'id' => 'category',
|
|
|
|
'class' => 'form-select mb-4',
|
|
|
|
'required' => 'required',
|
2021-05-25 16:05:12 +02:00
|
|
|
'placeholder' => lang('Podcast.form.category_placeholder')
|
2020-08-21 10:41:09 +02:00
|
|
|
]) ?>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_section_close() ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?= form_section(
|
|
|
|
lang('PodcastImport.advanced_params_section_title'),
|
2021-04-02 19:20:02 +02:00
|
|
|
lang('PodcastImport.advanced_params_section_subtitle'),
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
|
|
|
|
2020-09-08 13:45:17 +02:00
|
|
|
<?= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?>
|
2020-10-02 17:38:16 +02:00
|
|
|
<legend><?= lang('PodcastImport.slug_field.label') ?></legend>
|
2021-12-15 16:44:58 +01:00
|
|
|
<label for="title" class="inline-flex items-center">
|
2020-08-21 10:41:09 +02:00
|
|
|
<?= form_radio(
|
2020-10-02 17:38:16 +02:00
|
|
|
[
|
2021-12-15 16:44:58 +01:00
|
|
|
'id' => 'title',
|
2020-10-02 17:38:16 +02:00
|
|
|
'name' => 'slug_field',
|
2021-04-02 19:20:02 +02:00
|
|
|
'class' => 'form-radio text-pine-700',
|
2020-10-02 17:38:16 +02:00
|
|
|
],
|
2021-12-15 16:44:58 +01:00
|
|
|
'title',
|
|
|
|
old('slug_field') ? old('slug_field') === 'title' : true,
|
2020-08-21 10:41:09 +02:00
|
|
|
) ?>
|
2021-12-15 16:44:58 +01:00
|
|
|
<span class="ml-2"><?= lang('PodcastImport.slug_field.title') ?></span>
|
2020-08-21 10:41:09 +02:00
|
|
|
</label>
|
2021-12-15 16:44:58 +01:00
|
|
|
<label for="link" class="inline-flex items-center">
|
2020-08-21 10:41:09 +02:00
|
|
|
<?= form_radio(
|
2020-10-02 17:38:16 +02:00
|
|
|
[
|
2021-12-15 16:44:58 +01:00
|
|
|
'id' => 'link',
|
2020-10-02 17:38:16 +02:00
|
|
|
'name' => 'slug_field',
|
2021-04-02 19:20:02 +02:00
|
|
|
'class' => 'form-radio text-pine-700',
|
2020-10-02 17:38:16 +02:00
|
|
|
],
|
2021-12-15 16:44:58 +01:00
|
|
|
'link',
|
|
|
|
old('slug_field') && old('slug_field') === 'link',
|
2020-08-21 10:41:09 +02:00
|
|
|
) ?>
|
2021-12-15 16:44:58 +01:00
|
|
|
<span class="ml-2"><?= lang('PodcastImport.slug_field.link') ?></span>
|
2020-08-21 10:41:09 +02:00
|
|
|
</label>
|
|
|
|
<?= form_fieldset_close() ?>
|
|
|
|
|
2020-09-08 13:45:17 +02:00
|
|
|
<?= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?>
|
2021-02-11 18:41:20 +01:00
|
|
|
<legend><?= lang('PodcastImport.description_field') ?></legend>
|
2020-08-21 10:41:09 +02:00
|
|
|
<label for="description" class="inline-flex items-center">
|
|
|
|
<?= form_radio(
|
|
|
|
[
|
|
|
|
'id' => 'description',
|
|
|
|
'name' => 'description_field',
|
2021-04-02 19:20:02 +02:00
|
|
|
'class' => 'form-radio text-pine-700',
|
2020-08-21 10:41:09 +02:00
|
|
|
],
|
|
|
|
'description',
|
|
|
|
old('description_field')
|
|
|
|
? old('description_field') == 'description'
|
2021-04-02 19:20:02 +02:00
|
|
|
: true,
|
2020-08-21 10:41:09 +02:00
|
|
|
) ?>
|
2021-02-11 18:41:20 +01:00
|
|
|
<span class="ml-2"><description></span>
|
2020-08-21 10:41:09 +02:00
|
|
|
</label>
|
2020-09-08 13:45:17 +02:00
|
|
|
<label for="summary" class="inline-flex items-center">
|
2020-08-21 10:41:09 +02:00
|
|
|
<?= form_radio(
|
|
|
|
[
|
|
|
|
'id' => 'summary',
|
|
|
|
'name' => 'description_field',
|
2021-04-02 19:20:02 +02:00
|
|
|
'class' => 'form-radio text-pine-600',
|
2020-08-21 10:41:09 +02:00
|
|
|
],
|
|
|
|
'summary',
|
2021-05-06 16:00:48 +02:00
|
|
|
old('description_field') && old('description_field') == 'summary',
|
2020-08-21 10:41:09 +02:00
|
|
|
) ?>
|
2021-02-11 18:41:20 +01:00
|
|
|
<span class="ml-2"><itunes:summary></span>
|
2020-08-21 10:41:09 +02:00
|
|
|
</label>
|
|
|
|
<label for="subtitle_summary" class="inline-flex items-center">
|
|
|
|
<?= form_radio(
|
|
|
|
[
|
|
|
|
'id' => 'subtitle_summary',
|
|
|
|
'name' => 'description_field',
|
2021-04-02 19:20:02 +02:00
|
|
|
'class' => 'form-radio text-pine-700',
|
2020-08-21 10:41:09 +02:00
|
|
|
],
|
|
|
|
'subtitle_summary',
|
2021-05-06 16:00:48 +02:00
|
|
|
old('description_field') &&
|
|
|
|
old('description_field') == 'subtitle_summary',
|
2020-08-21 10:41:09 +02:00
|
|
|
) ?>
|
2021-02-11 18:41:20 +01:00
|
|
|
<span class="ml-2"><itunes:subtitle> + <itunes:summary></span>
|
|
|
|
</label>
|
|
|
|
<label for="content" class="inline-flex items-center">
|
|
|
|
<?= form_radio(
|
|
|
|
[
|
|
|
|
'id' => 'content',
|
|
|
|
'name' => 'description_field',
|
2021-04-02 19:20:02 +02:00
|
|
|
'class' => 'form-radio text-pine-700',
|
2021-02-11 18:41:20 +01:00
|
|
|
],
|
|
|
|
'content',
|
2021-05-06 16:00:48 +02:00
|
|
|
old('description_field') && old('description_field') == 'content',
|
2021-02-11 18:41:20 +01:00
|
|
|
) ?>
|
|
|
|
<span class="ml-2"><content:encoded></span>
|
2020-08-21 10:41:09 +02:00
|
|
|
</label>
|
|
|
|
<?= form_fieldset_close() ?>
|
|
|
|
|
|
|
|
|
|
|
|
<label class="inline-flex items-center mb-4">
|
|
|
|
<?= form_checkbox(
|
|
|
|
[
|
|
|
|
'id' => 'force_renumber',
|
|
|
|
'name' => 'force_renumber',
|
2021-04-02 19:20:02 +02:00
|
|
|
'class' => 'form-checkbox text-pine-700',
|
2020-08-21 10:41:09 +02:00
|
|
|
],
|
|
|
|
'yes',
|
2021-04-02 19:20:02 +02:00
|
|
|
old('force_renumber', false),
|
2020-08-21 10:41:09 +02:00
|
|
|
) ?>
|
2020-10-02 17:38:16 +02:00
|
|
|
<span class="ml-2"><?= lang('PodcastImport.force_renumber') ?></span>
|
|
|
|
<?= hint_tooltip(lang('PodcastImport.force_renumber_hint'), 'ml-1') ?>
|
2020-08-21 10:41:09 +02:00
|
|
|
</label>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_label(
|
|
|
|
lang('PodcastImport.season_number'),
|
|
|
|
'season_number',
|
|
|
|
[],
|
2021-04-02 19:20:02 +02:00
|
|
|
lang('PodcastImport.season_number_hint'),
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
2020-09-08 13:45:17 +02:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'season_number',
|
|
|
|
'name' => 'season_number',
|
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'value' => old('season_number'),
|
|
|
|
'type' => 'number',
|
|
|
|
]) ?>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_label(
|
|
|
|
lang('PodcastImport.max_episodes'),
|
|
|
|
'max_episodes',
|
|
|
|
[],
|
2021-04-02 19:20:02 +02:00
|
|
|
lang('PodcastImport.max_episodes_hint'),
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
2020-09-08 13:45:17 +02:00
|
|
|
<?= form_input([
|
|
|
|
'id' => 'max_episodes',
|
|
|
|
'name' => 'max_episodes',
|
|
|
|
'class' => 'form-input mb-4',
|
|
|
|
'value' => old('max_episodes'),
|
|
|
|
'type' => 'number',
|
|
|
|
]) ?>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= form_section_close() ?>
|
|
|
|
|
|
|
|
<?= button(
|
|
|
|
lang('PodcastImport.submit'),
|
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-09-08 13:45:17 +02:00
|
|
|
|
2020-08-21 10:41:09 +02:00
|
|
|
<?= form_close() ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|