2020-07-10 12:20:25 +00:00
|
|
|
<?= $this->extend('admin/_layout') ?>
|
2020-06-05 13:54:40 +00:00
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->section('title') ?>
|
|
|
|
<?= lang('Podcast.create') ?>
|
|
|
|
<?= $this->endSection() ?>
|
2020-06-05 13:54:40 +00:00
|
|
|
|
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->section('content') ?>
|
2020-06-05 13:54:40 +00:00
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= form_open_multipart(route_to('podcast_create'), [
|
2020-06-10 15:00:12 +00:00
|
|
|
'method' => 'post',
|
|
|
|
'class' => 'flex flex-col max-w-md',
|
|
|
|
]) ?>
|
2020-06-05 13:54:40 +00:00
|
|
|
<?= csrf_field() ?>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
2020-06-26 14:34:52 +00:00
|
|
|
<label for="title"><?= lang('Podcast.form.title') ?></label>
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="text" class="form-input" id="title" name="title" value="<?= old(
|
|
|
|
'title'
|
|
|
|
) ?>" required />
|
2020-06-05 13:54:40 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
2020-06-26 14:34:52 +00:00
|
|
|
<label for="name"><?= lang('Podcast.form.name') ?></label>
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="text" class="form-input" id="name" name="name" value="<?= old(
|
|
|
|
'name'
|
|
|
|
) ?>" required />
|
2020-06-05 13:54:40 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
2020-06-26 14:34:52 +00:00
|
|
|
<label for="description"><?= lang('Podcast.form.description') ?></label>
|
2020-07-27 09:35:34 +00:00
|
|
|
<textarea class="form-textarea" id="description" name="description" required data-editor="markdown"><?= old(
|
2020-07-16 10:08:23 +00:00
|
|
|
'description'
|
|
|
|
) ?></textarea>
|
2020-06-05 13:54:40 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
2020-06-10 15:00:12 +00:00
|
|
|
<label for="episode_description_footer"><?= lang(
|
2020-06-26 14:34:52 +00:00
|
|
|
'Podcast.form.episode_description_footer'
|
2020-06-10 15:00:12 +00:00
|
|
|
) ?></label>
|
2020-07-27 09:35:34 +00:00
|
|
|
<textarea class="form-textarea" id="episode_description_footer" name="episode_description_footer" data-editor="markdown"><?= old(
|
2020-07-16 10:08:23 +00:00
|
|
|
'episode_description_footer'
|
|
|
|
) ?></textarea>
|
2020-06-05 13:54:40 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
2020-06-26 14:34:52 +00:00
|
|
|
<label for="image"><?= lang('Podcast.form.image') ?></label>
|
2020-06-05 13:54:40 +00:00
|
|
|
<input type="file" class="form-input" id="image" name="image" required />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
2020-06-26 14:34:52 +00:00
|
|
|
<label for="language"><?= lang('Podcast.form.language') ?></label>
|
2020-06-05 13:54:40 +00:00
|
|
|
<select id="language" name="language" autocomplete="off" class="form-select" required>
|
2020-06-10 15:00:12 +00:00
|
|
|
<?php foreach ($languages as $language): ?>
|
2020-07-16 10:08:23 +00:00
|
|
|
<option value="<?= $language->code ?>"
|
|
|
|
<?php if (
|
|
|
|
old('language') == $language->code
|
|
|
|
): ?> selected <?php endif; ?>
|
|
|
|
<?php if (
|
|
|
|
!old('language') &&
|
2020-08-04 11:25:22 +00:00
|
|
|
$language->code == $browserLang
|
2020-07-16 10:08:23 +00:00
|
|
|
): ?> selected <?php endif; ?>
|
|
|
|
>
|
2020-06-26 14:34:52 +00:00
|
|
|
<?= $language->native_name ?>
|
|
|
|
</option>
|
2020-06-10 15:00:12 +00:00
|
|
|
<?php endforeach; ?>
|
2020-06-05 13:54:40 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
2020-06-26 14:34:52 +00:00
|
|
|
<label for="category"><?= lang('Podcast.form.category') ?></label>
|
2020-06-05 13:54:40 +00:00
|
|
|
<select id="category" name="category" class="form-select" required>
|
2020-06-10 15:00:12 +00:00
|
|
|
<?php foreach ($categories as $category): ?>
|
2020-07-16 10:08:23 +00:00
|
|
|
<option value="<?= $category->code ?>"
|
|
|
|
<?php if (
|
|
|
|
old('category') == $category->code
|
|
|
|
): ?> selected <?php endif; ?>
|
|
|
|
><?= lang('Podcast.category_options.' . $category->code) ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
</option>
|
2020-06-10 15:00:12 +00:00
|
|
|
<?php endforeach; ?>
|
2020-06-05 13:54:40 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="inline-flex items-center mb-4">
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="checkbox" id="explicit" name="explicit" class="form-checkbox" <?php if (
|
|
|
|
old('explicit')
|
|
|
|
): ?> checked <?php endif; ?> />
|
2020-06-10 15:00:12 +00:00
|
|
|
<label for="explicit" class="pl-2"><?= lang(
|
2020-06-26 14:34:52 +00:00
|
|
|
'Podcast.form.explicit'
|
2020-06-10 15:00:12 +00:00
|
|
|
) ?></label>
|
2020-06-05 13:54:40 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
2020-06-26 14:34:52 +00:00
|
|
|
<label for="author_name"><?= lang('Podcast.form.author_name') ?></label>
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="text" class="form-input" id="author_name" name="author_name" value="<?= old(
|
|
|
|
'author_name'
|
|
|
|
) ?>" />
|
2020-06-05 13:54:40 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
2020-06-26 14:34:52 +00:00
|
|
|
<label for="author_email"><?= lang('Podcast.form.author_email') ?></label>
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="email" class="form-input" id="author_email" name="author_email" value="<?= old(
|
|
|
|
'author_email'
|
|
|
|
) ?>" />
|
2020-06-26 14:34:52 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
|
|
|
<label for="owner_name"><?= lang('Podcast.form.owner_name') ?></label>
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="text" class="form-input" id="owner_name" name="owner_name" value="<?= old(
|
|
|
|
'owner_name'
|
|
|
|
) ?>" />
|
2020-06-05 13:54:40 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
2020-06-26 14:34:52 +00:00
|
|
|
<label for="owner_email"><?= lang('Podcast.form.owner_email') ?></label>
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="email" class="form-input" id="owner_email" name="owner_email" value="<?= old(
|
|
|
|
'owner_email'
|
|
|
|
) ?>" required />
|
2020-06-05 13:54:40 +00:00
|
|
|
</div>
|
|
|
|
|
2020-06-10 15:00:12 +00:00
|
|
|
<fieldset class="flex flex-col mb-4">
|
2020-06-26 14:34:52 +00:00
|
|
|
<legend><?= lang('Podcast.form.type.label') ?></legend>
|
|
|
|
<label for="episodic" class="inline-flex items-center">
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="radio" class="form-radio" value="episodic" id="episodic" name="type" required <?php if (
|
|
|
|
!old('type') ||
|
|
|
|
old('type') == 'episodic'
|
|
|
|
): ?> checked <?php endif; ?> />
|
|
|
|
<span class="ml-2"><?= lang('Podcast.form.type.episodic') ?></span>
|
2020-06-26 14:34:52 +00:00
|
|
|
</label>
|
|
|
|
<label for="serial" class="inline-flex items-center">
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="radio" class="form-radio" value="serial" id="serial" name="type" required <?php if (
|
|
|
|
old('type') == 'serial'
|
|
|
|
): ?> checked <?php endif; ?> />
|
|
|
|
<span class="ml-2"><?= lang('Podcast.form.type.serial') ?></span>
|
2020-06-10 15:00:12 +00:00
|
|
|
</label>
|
2020-06-05 13:54:40 +00:00
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
2020-06-26 14:34:52 +00:00
|
|
|
<label for="copyright"><?= lang('Podcast.form.copyright') ?></label>
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="text" class="form-input" id="copyright" name="copyright" value="<?= old(
|
|
|
|
'copyright'
|
|
|
|
) ?>" />
|
2020-06-05 13:54:40 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="inline-flex items-center mb-4">
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="checkbox" id="block" name="block" class="form-checkbox" <?php if (
|
|
|
|
old('block')
|
|
|
|
): ?> checked <?php endif; ?> />
|
2020-06-26 14:34:52 +00:00
|
|
|
<label for="block" class="pl-2"><?= lang('Podcast.form.block') ?></label>
|
2020-06-05 13:54:40 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="inline-flex items-center mb-4">
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="checkbox" id="complete" name="complete" class="form-checkbox" <?php if (
|
|
|
|
old('complete')
|
|
|
|
): ?> checked <?php endif; ?> />
|
2020-06-10 15:00:12 +00:00
|
|
|
<label for="complete" class="pl-2"><?= lang(
|
2020-06-26 14:34:52 +00:00
|
|
|
'Podcast.form.complete'
|
2020-06-10 15:00:12 +00:00
|
|
|
) ?></label>
|
2020-06-05 13:54:40 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
2020-06-10 15:00:12 +00:00
|
|
|
<label for="custom_html_head"><?= esc(
|
2020-06-26 14:34:52 +00:00
|
|
|
lang('Podcast.form.custom_html_head')
|
2020-06-10 15:00:12 +00:00
|
|
|
) ?></label>
|
2020-07-31 16:05:10 +00:00
|
|
|
<textarea class="form-textarea" id="custom_html_head" name="custom_html_head" data-editor="html"><?= old(
|
|
|
|
'custom_html_head'
|
|
|
|
) ?></textarea>
|
2020-06-05 13:54:40 +00:00
|
|
|
</div>
|
|
|
|
|
2020-06-10 15:00:12 +00:00
|
|
|
<button type="submit" name="submit" class="self-end px-4 py-2 bg-gray-200"><?= lang(
|
2020-06-30 18:17:41 +02:00
|
|
|
'Podcast.form.submit_create'
|
2020-06-10 15:00:12 +00:00
|
|
|
) ?></button>
|
2020-06-05 13:54:40 +00:00
|
|
|
<?= form_close() ?>
|
|
|
|
|
|
|
|
|
2020-06-10 15:00:12 +00:00
|
|
|
<?= $this->endSection() ?>
|