= $this->extend('_layout') ?>
= $this->section('title') ?>
= lang('Episode.publish_edit') ?>
= $this->endSection() ?>
= $this->section('pageTitle') ?>
= lang('Episode.publish_edit') ?>
= $this->endSection() ?>
= $this->section('content') ?>
= anchor(
route_to('episode-view', $podcast->id, $episode->id),
icon('arrow-left', 'mr-2 text-lg') . lang('Episode.publish_form.back_to_episode_dashboard'),
['class' => 'inline-flex items-center font-semibold mr-4 text-sm'],
) ?>
= form_open(route_to('episode-publish_edit', $podcast->id, $episode->id), [
'method' => 'post',
'class' => 'mx-auto flex flex-col max-w-xl items-start',
'data-submit' => 'validate-message'
]) ?>
= csrf_field() ?>
= form_hidden('client_timezone', 'UTC') ?>
= form_hidden('post_id', $post->id) ?>
= lang('Episode.publish_form.post_hint') ?>
= $podcast->actor->display_name ?>
@= $podcast->actor->username ?>
= relative_time($post->published_at, 'text-xs text-gray-500') ?>
= form_textarea(
[
'id' => 'message',
'name' => 'message',
'class' => 'form-textarea',
'placeholder' => 'Write your message...',
'autofocus' => ''
],
old('message', $post->message, false),
['rows' => 2],
) ?>
= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?>
= form_radio(
[
'id' => 'schedule',
'name' => 'publication_method',
'class' => 'text-pine-700',
],
'schedule',
old('publication_method')
? old('publication_method') === 'schedule'
: true,
) ?>
= form_label(
lang('Episode.publish_form.scheduled_publication_date'),
'scheduled_publication_date',
[],
lang('Episode.publish_form.scheduled_publication_date_hint'),
) ?>
= form_input([
'id' => 'scheduled_publication_date',
'name' => 'scheduled_publication_date',
'class' => 'form-input rounded-r-none flex-1',
'value' => old(
'scheduled_publication_date',
$episode->published_at,
),
'data-input' => '',
]) ?>
= form_fieldset_close() ?>
= icon('alert', 'mr-2 text-lg flex-shrink-0') . lang(
'Episode.publish_form.message_warning',
) ?>
= lang(
'Episode.publish_form.message_warning_hint',
) ?>
= anchor(
route_to('episode-publish-cancel', $podcast->id, $episode->id),
lang('Episode.publish_form.cancel_publication'),
['class' => 'py-2 px-3 rounded-full bg-red-100 text-red-900 font-semibold mr-4'],
) ?>
= button(
lang('Episode.publish_form.submit_edit'),
'',
['variant' => 'primary'],
[
'type' => 'submit',
'data-btn-text-warning' => lang('Episode.publish_form.message_warning_submit'),
'data-btn-text' => lang('Episode.publish_form.submit_edit')
],
) ?>
= form_close() ?>
= $this->endSection() ?>