2020-07-10 12:20:25 +00:00
|
|
|
<?= $this->extend('admin/_layout') ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->section('title') ?>
|
|
|
|
<?= lang('Episode.create') ?>
|
|
|
|
<?= $this->endSection() ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->section('content') ?>
|
2020-06-26 14:34:52 +00:00
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= form_open_multipart(route_to('episode_create', $podcast->id), [
|
2020-06-26 14:34:52 +00:00
|
|
|
'method' => 'post',
|
|
|
|
'class' => 'flex flex-col max-w-md',
|
|
|
|
]) ?>
|
|
|
|
<?= csrf_field() ?>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
2020-06-30 18:17:41 +02:00
|
|
|
<label for="enclosure"><?= lang('Episode.form.file') ?></label>
|
|
|
|
<input type="file" class="form-input" id="enclosure" name="enclosure" required accept=".mp3,.m4a" />
|
2020-06-26 14:34:52 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
|
|
|
<label for="title"><?= lang('Episode.form.title') ?></label>
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="text" class="form-input" id="title" name="title" required value="<?= old(
|
|
|
|
'title'
|
|
|
|
) ?>" />
|
2020-06-26 14:34:52 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
|
|
|
<label for="slug"><?= lang('Episode.form.slug') ?></label>
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="text" class="form-input" id="slug" name="slug" required value="<?= old(
|
|
|
|
'slug'
|
|
|
|
) ?>" />
|
2020-06-26 14:34:52 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
|
|
|
<label for="description"><?= lang('Episode.form.description') ?></label>
|
2020-07-16 10:08:23 +00:00
|
|
|
<textarea class="form-textarea" id="description" name="description" required><?= old(
|
|
|
|
'description'
|
|
|
|
) ?></textarea>
|
2020-06-26 14:34:52 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
|
|
|
<label for="pub_date"><?= lang('Episode.form.pub_date') ?></label>
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="date" class="form-input" id="pub_date" name="pub_date" value="<?= old(
|
|
|
|
'pub_date'
|
|
|
|
) || date('Y-m-d') ?>" />
|
2020-06-26 14:34:52 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
|
|
|
<label for="image"><?= lang('Episode.form.image') ?></label>
|
|
|
|
<input type="file" class="form-input" id="image" name="image" accept=".jpg,.jpeg,.png" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
|
|
|
<label for="episode_number"><?= lang(
|
|
|
|
'Episode.form.episode_number'
|
|
|
|
) ?></label>
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="number" class="form-input" id="episode_number" name="episode_number" required value="<?= old(
|
|
|
|
'episode_number'
|
|
|
|
) ?>" />
|
2020-06-26 14:34:52 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
|
|
|
<label for="season_number"><?= lang('Episode.form.season_number') ?></label>
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="number" class="form-input" id="season_number" name="season_number" value="<?= old(
|
|
|
|
'season_number'
|
|
|
|
) ?>" />
|
2020-06-26 14:34:52 +00:00
|
|
|
</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-26 14:34:52 +00:00
|
|
|
<label for="explicit" class="pl-2"><?= lang(
|
|
|
|
'Episode.form.explicit'
|
|
|
|
) ?></label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
|
|
|
<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-26 14:34:52 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="flex flex-col mb-4">
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<fieldset class="flex flex-col mb-4">
|
|
|
|
<legend><?= lang('Episode.form.type.label') ?></legend>
|
|
|
|
<label for="full" class="inline-flex items-center">
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="radio" class="form-radio" value="full" id="full" name="type" required <?php if (
|
|
|
|
!old('type') ||
|
|
|
|
old('type') == 'full'
|
|
|
|
): ?> checked <?php endif; ?> />
|
2020-06-26 14:34:52 +00:00
|
|
|
<span class="ml-2"><?= lang('Episode.form.type.full') ?></span>
|
|
|
|
</label>
|
|
|
|
<label for="trailer" class="inline-flex items-center">
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="radio" class="form-radio" value="trailer" id="trailer" name="type" required <?php if (
|
|
|
|
old('type') == 'trailer'
|
|
|
|
): ?> checked <?php endif; ?> />
|
2020-06-26 14:34:52 +00:00
|
|
|
<span class="ml-2"><?= lang('Episode.form.type.trailer') ?></span>
|
|
|
|
</label>
|
|
|
|
<label for="bonus" class="inline-flex items-center">
|
2020-07-16 10:08:23 +00:00
|
|
|
<input type="radio" class="form-radio" value="bonus" id="bonus" name="type" required <?php if (
|
|
|
|
old('type') == 'bonus'
|
|
|
|
): ?> checked <?php endif; ?> />
|
2020-06-26 14:34:52 +00:00
|
|
|
<span class="ml-2"><?= lang('Episode.form.type.bonus') ?></span>
|
|
|
|
</label>
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<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('Episode.form.block') ?></label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<button type="submit" name="submit" class="self-end px-4 py-2 bg-gray-200"><?= lang(
|
2020-06-30 18:17:41 +02:00
|
|
|
'Episode.form.submit_create'
|
2020-06-26 14:34:52 +00:00
|
|
|
) ?></button>
|
|
|
|
<?= form_close() ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|