refactor: harmonize redirects after submitting forms
go back to form after submitting an edit form
This commit is contained in:
parent
6e9451a110
commit
d0cb964b0f
|
@ -21,7 +21,7 @@ class DropdownMenu extends Component
|
|||
|
||||
public function setItems(string $value): void
|
||||
{
|
||||
$this->items = json_decode(html_entity_decode($value), true);
|
||||
$this->items = json_decode(htmlspecialchars_decode($value), true);
|
||||
}
|
||||
|
||||
public function render(): string
|
||||
|
@ -39,7 +39,7 @@ class DropdownMenu extends Component
|
|||
]);
|
||||
break;
|
||||
case 'html':
|
||||
$menuItems .= html_entity_decode($item['content']);
|
||||
$menuItems .= htmlspecialchars_decode($item['content']);
|
||||
break;
|
||||
case 'separator':
|
||||
$menuItems .= '<hr class="my-2 border border-subtle">';
|
||||
|
|
|
@ -13,7 +13,10 @@ class MarkdownEditor extends FormComponent
|
|||
$this->attributes['class'] = 'bg-elevated border-none focus:border-none focus:outline-none focus:ring-0 w-full h-full';
|
||||
$this->attributes['rows'] = 6;
|
||||
|
||||
$textarea = form_textarea($this->attributes, old($this->name, html_entity_decode($this->value), false));
|
||||
// dd(htmlspecialchars_decode($this->value));
|
||||
$value = htmlspecialchars_decode($this->value);
|
||||
|
||||
$textarea = form_textarea($this->attributes, old($this->name, $value, false));
|
||||
$icons = [
|
||||
'heading' => icon('heading'),
|
||||
'bold' => icon('bold'),
|
||||
|
|
|
@ -18,12 +18,12 @@ class MultiSelect extends FormComponent
|
|||
|
||||
public function setOptions(string $value): void
|
||||
{
|
||||
$this->options = json_decode(html_entity_decode($value), true);
|
||||
$this->options = json_decode(htmlspecialchars_decode($value), true);
|
||||
}
|
||||
|
||||
public function setSelected(string $selected): void
|
||||
{
|
||||
$this->selected = json_decode($selected);
|
||||
$this->selected = json_decode(htmlspecialchars_decode($selected), true);
|
||||
}
|
||||
|
||||
public function render(): string
|
||||
|
|
|
@ -15,7 +15,7 @@ class Select extends FormComponent
|
|||
|
||||
public function setOptions(string $value): void
|
||||
{
|
||||
$this->options = json_decode(html_entity_decode($value), true);
|
||||
$this->options = json_decode(htmlspecialchars_decode($value), true);
|
||||
}
|
||||
|
||||
public function render(): string
|
||||
|
|
|
@ -9,7 +9,7 @@ class Textarea extends FormComponent
|
|||
public function setValue(?string $value): void
|
||||
{
|
||||
if ($value) {
|
||||
$this->value = html_entity_decode($value);
|
||||
$this->value = htmlspecialchars_decode($value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
Sorry! Cannot seem to find the page you were looking for.
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
<button class="inline-flex items-center justify-center px-3 py-1 text-sm font-semibold rounded-full shadow-xs text-accent-contrast focus:ring-accent md:px-4 md:py-2 md:text-base bg-accent-base hover:bg-accent-hover"><?= lang('Common.go_back') ?></button>
|
||||
<a href="<?= previous_url() ?>" class="inline-flex items-center justify-center px-3 py-1 text-sm font-semibold rounded-full shadow-xs text-accent-contrast focus:ring-accent md:px-4 md:py-2 md:text-base bg-accent-base hover:bg-accent-hover"><?= lang('Common.go_back') ?></a>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -166,7 +166,10 @@ class ContributorController extends BaseController
|
|||
(int) $this->request->getPost('role'),
|
||||
);
|
||||
|
||||
return redirect()->route('contributor-list', [$this->podcast->id]);
|
||||
return redirect()->route('contributor-edit', [$this->podcast->id, $this->user->id])->with(
|
||||
'message',
|
||||
lang('Contributor.messages.editSuccess')
|
||||
);
|
||||
}
|
||||
|
||||
public function remove(): RedirectResponse
|
||||
|
@ -174,7 +177,7 @@ class ContributorController extends BaseController
|
|||
if ($this->podcast->created_by === $this->user->id) {
|
||||
return redirect()
|
||||
->back()
|
||||
->with('errors', [lang('Contributor.messages.removeOwnerContributorError')]);
|
||||
->with('errors', [lang('Contributor.messages.removeOwnerError')]);
|
||||
}
|
||||
|
||||
$podcastModel = new PodcastModel();
|
||||
|
@ -187,10 +190,10 @@ class ContributorController extends BaseController
|
|||
}
|
||||
|
||||
return redirect()
|
||||
->back()
|
||||
->route('contributor-list', [$this->podcast->id])
|
||||
->with(
|
||||
'message',
|
||||
lang('Contributor.messages.removeContributorSuccess', [
|
||||
lang('Contributor.messages.removeSuccess', [
|
||||
'username' => $this->user->username,
|
||||
'podcastTitle' => $this->podcast->title,
|
||||
]),
|
||||
|
|
|
@ -205,7 +205,10 @@ class EpisodeController extends BaseController
|
|||
|
||||
$db->transComplete();
|
||||
|
||||
return redirect()->route('episode-view', [$this->podcast->id, $newEpisodeId]);
|
||||
return redirect()->route('episode-view', [$this->podcast->id, $newEpisodeId])->with(
|
||||
'message',
|
||||
lang('Episode.messages.createSuccess')
|
||||
);
|
||||
}
|
||||
|
||||
public function edit(): string
|
||||
|
@ -334,11 +337,18 @@ class EpisodeController extends BaseController
|
|||
|
||||
$db->transComplete();
|
||||
|
||||
return redirect()->route('episode-view', [$this->podcast->id, $this->episode->id]);
|
||||
return redirect()->route('episode-edit', [$this->podcast->id, $this->episode->id])->with(
|
||||
'message',
|
||||
lang('Episode.messages.editSuccess')
|
||||
);
|
||||
}
|
||||
|
||||
public function transcriptDelete(): RedirectResponse
|
||||
{
|
||||
if ($this->episode->transcript === null) {
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
$mediaModel = new MediaModel();
|
||||
if (! $mediaModel->deleteMedia($this->episode->transcript)) {
|
||||
return redirect()
|
||||
|
@ -352,6 +362,10 @@ class EpisodeController extends BaseController
|
|||
|
||||
public function chaptersDelete(): RedirectResponse
|
||||
{
|
||||
if ($this->episode->chapters === null) {
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
$mediaModel = new MediaModel();
|
||||
if (! $mediaModel->deleteMedia($this->episode->chapters)) {
|
||||
return redirect()
|
||||
|
@ -699,16 +713,18 @@ class EpisodeController extends BaseController
|
|||
(new PostModel())->removePost($post);
|
||||
}
|
||||
|
||||
// set episode published_at to null to unpublish before deletion
|
||||
$this->episode->published_at = null;
|
||||
|
||||
$episodeModel = new EpisodeModel();
|
||||
if (! $episodeModel->update($this->episode->id, $this->episode)) {
|
||||
$db->transRollback();
|
||||
return redirect()
|
||||
->back()
|
||||
->withInput()
|
||||
->with('errors', $episodeModel->errors());
|
||||
if ($this->episode->published_at !== null) {
|
||||
// if episode is published, set episode published_at to null to unpublish before deletion
|
||||
$this->episode->published_at = null;
|
||||
|
||||
if (! $episodeModel->update($this->episode->id, $this->episode)) {
|
||||
$db->transRollback();
|
||||
return redirect()
|
||||
->back()
|
||||
->withInput()
|
||||
->with('errors', $episodeModel->errors());
|
||||
}
|
||||
}
|
||||
|
||||
$episodeModel->delete($this->episode->id);
|
||||
|
|
|
@ -106,7 +106,7 @@ class PageController extends BaseController
|
|||
->with('errors', $pageModel->errors());
|
||||
}
|
||||
|
||||
return redirect()->route('page-list');
|
||||
return redirect()->route('page-edit', [$this->page->id])->with('message', lang('Page.messages.editSuccess'));
|
||||
}
|
||||
|
||||
public function delete(): RedirectResponse
|
||||
|
|
|
@ -99,7 +99,8 @@ class PersonController extends BaseController
|
|||
|
||||
$db->transComplete();
|
||||
|
||||
return redirect()->route('person-list');
|
||||
return redirect()->route('person-list')
|
||||
->with('message', lang('Person.messages.createSuccess'));
|
||||
}
|
||||
|
||||
public function edit(): string
|
||||
|
@ -145,13 +146,17 @@ class PersonController extends BaseController
|
|||
->with('errors', $personModel->errors());
|
||||
}
|
||||
|
||||
return redirect()->route('person-view', [$this->person->id]);
|
||||
return redirect()->route('person-edit', [$this->person->id])->with(
|
||||
'message',
|
||||
lang('Person.messages.editSuccess')
|
||||
);
|
||||
}
|
||||
|
||||
public function delete(): RedirectResponse
|
||||
{
|
||||
(new PersonModel())->delete($this->person->id);
|
||||
|
||||
return redirect()->route('person-list');
|
||||
return redirect()->route('person-list')
|
||||
->with('message', lang('Person.messages.deleteSuccess'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -255,7 +255,10 @@ class PodcastController extends BaseController
|
|||
|
||||
$db->transComplete();
|
||||
|
||||
return redirect()->route('podcast-view', [$newPodcastId]);
|
||||
return redirect()->route('podcast-view', [$newPodcastId])->with(
|
||||
'message',
|
||||
lang('Podcast.messages.createSuccess')
|
||||
);
|
||||
}
|
||||
|
||||
public function edit(): string
|
||||
|
@ -354,7 +357,10 @@ class PodcastController extends BaseController
|
|||
|
||||
$db->transComplete();
|
||||
|
||||
return redirect()->back();
|
||||
return redirect()->route('podcast-edit', [$this->podcast->id])->with(
|
||||
'message',
|
||||
lang('Podcast.messages.editSuccess')
|
||||
);
|
||||
}
|
||||
|
||||
public function deleteBanner(): RedirectResponse
|
||||
|
|
|
@ -134,7 +134,10 @@ class SoundbiteController extends BaseController
|
|||
->with('errors', $clipModel->errors());
|
||||
}
|
||||
|
||||
return redirect()->route('soundbites-list', [$this->podcast->id, $this->episode->id]);
|
||||
return redirect()->route('soundbites-list', [$this->podcast->id, $this->episode->id])->with(
|
||||
'message',
|
||||
lang('Soundbite.messages.createSuccess')
|
||||
);
|
||||
}
|
||||
|
||||
public function delete(string $soundbiteId): RedirectResponse
|
||||
|
@ -158,6 +161,9 @@ class SoundbiteController extends BaseController
|
|||
}
|
||||
}
|
||||
|
||||
return redirect()->route('soundbites-list', [$this->podcast->id, $this->episode->id]);
|
||||
return redirect()->route('soundbites-list', [$this->podcast->id, $this->episode->id])->with(
|
||||
'message',
|
||||
lang('Soundbite.messages.deleteSuccess')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ return [
|
|||
'podcast_admin' => 'Podcast admin',
|
||||
],
|
||||
'messages' => [
|
||||
'removeOwnerContributorError' => "You can't remove the podcast owner!",
|
||||
'removeContributorSuccess' =>
|
||||
'removeOwnerError' => "You can't remove the podcast owner!",
|
||||
'removeSuccess' =>
|
||||
'You have successfully removed {username} from {podcastTitle}',
|
||||
'alreadyAddedError' =>
|
||||
"The contributor you're trying to add has already been added!",
|
||||
|
|
|
@ -43,6 +43,10 @@ return [
|
|||
'comments' => 'Comments',
|
||||
'actions' => 'Actions',
|
||||
],
|
||||
'messages' => [
|
||||
'createSuccess' => 'Episode has been successfully created!',
|
||||
'editSuccess' => 'Episode has been successfully updated!',
|
||||
],
|
||||
'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.',
|
||||
|
|
|
@ -9,6 +9,12 @@ declare(strict_types=1);
|
|||
*/
|
||||
|
||||
return [
|
||||
'messages' => [
|
||||
'blockActorSuccess' => '{actor} has been blocked!',
|
||||
'unblockActorSuccess' => 'Actor has been unblocked!',
|
||||
'blockDomainSuccess' => '{domain} has been blocked!',
|
||||
'unblockDomainSuccess' => '{domain} has been unblocked!',
|
||||
],
|
||||
'blocked_actors' => 'Blocked accounts',
|
||||
'blocked_domains' => 'Blocked domains',
|
||||
'block_lists_form' => [
|
||||
|
|
|
@ -25,5 +25,6 @@ return [
|
|||
],
|
||||
'messages' => [
|
||||
'createSuccess' => 'The page “{pageTitle}” was created successfully!',
|
||||
'editSuccess' => 'The page was successfully updated!',
|
||||
],
|
||||
];
|
||||
|
|
|
@ -16,6 +16,11 @@ return [
|
|||
'view' => 'View person',
|
||||
'edit' => 'Edit person',
|
||||
'delete' => 'Delete person',
|
||||
'messages' => [
|
||||
'createSuccess' => 'Person has been successfully created!',
|
||||
'editSuccess' => 'Person has been successfully updated!',
|
||||
'deleteSuccess' => 'Person has been removed!',
|
||||
],
|
||||
'form' => [
|
||||
'avatar' => 'Avatar',
|
||||
'avatar_size_hint' =>
|
||||
|
|
|
@ -22,6 +22,11 @@ return [
|
|||
'go_to_page' => 'Go to page',
|
||||
'latest_episodes' => 'Latest episodes',
|
||||
'see_all_episodes' => 'See all episodes',
|
||||
'messages' => [
|
||||
'createSuccess' => 'Podcast has been successfully created!',
|
||||
'editSuccess' => 'Podcast has been successfully updated!',
|
||||
'importSuccess' => 'Podcast has been successfully imported!',
|
||||
],
|
||||
'form' => [
|
||||
'identity_section_title' => 'Podcast identity',
|
||||
'identity_section_subtitle' => 'These fields allow you to get noticed.',
|
||||
|
|
|
@ -13,6 +13,10 @@ return [
|
|||
'title' => 'Soundbites',
|
||||
'soundbite' => 'Soundbite',
|
||||
],
|
||||
'messages' => [
|
||||
'createSuccess' => 'Soundbite has been successfully created!',
|
||||
'deleteSuccess' => 'Soundbite has been successfully removed!',
|
||||
],
|
||||
'form' => [
|
||||
'title' => 'New soundbite',
|
||||
'soundbite_title' => 'Soundbite title',
|
||||
|
|
|
@ -34,6 +34,10 @@ return [
|
|||
'retry' => 'Retry clip generation',
|
||||
'delete' => 'Delete clip',
|
||||
'logs' => 'Job logs',
|
||||
'messages' => [
|
||||
'createSuccess' => 'Video clip has been successfully created!',
|
||||
'deleteSuccess' => 'Video clip has been successfully removed!',
|
||||
],
|
||||
'form' => [
|
||||
'title' => 'New video clip',
|
||||
'params_section_title' => 'Video clip parameters',
|
||||
|
|
|
@ -32,9 +32,9 @@ return [
|
|||
'podcast_admin' => 'Administrateur de Podcasts',
|
||||
],
|
||||
'messages' => [
|
||||
'removeOwnerContributorError' =>
|
||||
'removeOwnerError' =>
|
||||
'Vous ne pouvez pas retirer le propriétaire du podcast !',
|
||||
'removeContributorSuccess' =>
|
||||
'removeSuccess' =>
|
||||
'Vous avez retiré {username} de {podcastTitle}',
|
||||
'alreadyAddedError' =>
|
||||
'Le contributeur que vous essayez d’ajouter est déjà présent.',
|
||||
|
|
|
@ -44,6 +44,10 @@ return [
|
|||
'comments' => 'Commentaires',
|
||||
'actions' => 'Actions',
|
||||
],
|
||||
'messages' => [
|
||||
'createSuccess' => 'L’épisode a été créé avec succès !',
|
||||
'editSuccess' => 'L’épisode a bien été mis à jour !',
|
||||
],
|
||||
'form' => [
|
||||
'warning' =>
|
||||
'En cas d’erreur fatale, essayez d’augmenter 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.',
|
||||
|
|
|
@ -9,6 +9,12 @@ declare(strict_types=1);
|
|||
*/
|
||||
|
||||
return [
|
||||
'messages' => [
|
||||
'blockActorSuccess' => '{actor} a été bloqué !',
|
||||
'unblockActorSuccess' => 'L’utilisateur a été débloqué !',
|
||||
'blockDomainSuccess' => '{domain} a été bloqué !',
|
||||
'unblockDomainSuccess' => '{domain} a été débloqué !',
|
||||
],
|
||||
'block_lists' => 'Listes de blocage',
|
||||
'block_lists_form' => [
|
||||
'blocked_users' => 'Utilisateurs bloqués',
|
||||
|
|
|
@ -24,6 +24,7 @@ return [
|
|||
'submit_edit' => 'Enregistrer',
|
||||
],
|
||||
'messages' => [
|
||||
'createSuccess' => 'La page {pageTitle} a été créée avec succès !',
|
||||
'createSuccess' => 'La page “{pageTitle}” a été créée avec succès !',
|
||||
'editSuccess' => 'La page a bien été mise à jour !',
|
||||
],
|
||||
];
|
||||
|
|
|
@ -16,6 +16,11 @@ return [
|
|||
'view' => 'Voir l’intervenant',
|
||||
'edit' => 'Modifier l’intervenant',
|
||||
'delete' => 'Supprimer l’intervenant',
|
||||
'messages' => [
|
||||
'createSuccess' => 'L’intervenant a été créé avec succès !',
|
||||
'editSuccess' => 'L’intervenant a bien été mis à jour !',
|
||||
'deleteSuccess' => 'L’intervenant a bien été retiré !',
|
||||
],
|
||||
'form' => [
|
||||
'avatar' => 'Avatar',
|
||||
'avatar_size_hint' =>
|
||||
|
|
|
@ -22,6 +22,11 @@ return [
|
|||
'go_to_page' => 'Aller à la page',
|
||||
'latest_episodes' => 'Derniers épisodes',
|
||||
'see_all_episodes' => 'Voir tous les épisodes',
|
||||
'messages' => [
|
||||
'createSuccess' => 'Le podcast a été créé avec succès !',
|
||||
'editSuccess' => 'Le podcast a bien été mis à jour !',
|
||||
'importSuccess' => 'Le podcast a été importé avec succès !',
|
||||
],
|
||||
'form' => [
|
||||
'identity_section_title' => 'Informations sur le Podcast',
|
||||
'identity_section_subtitle' =>
|
||||
|
|
|
@ -13,6 +13,10 @@ return [
|
|||
'title' => 'Extraits sonores',
|
||||
'soundbite' => 'Extrait sonore',
|
||||
],
|
||||
'messages' => [
|
||||
'createSuccess' => 'L’extrait sonore a été créé avec succès !',
|
||||
'deleteSuccess' => 'L’extrait sonore a bien été supprimé !',
|
||||
],
|
||||
'form' => [
|
||||
'title' => 'Nouvel extrait sonore',
|
||||
'soundbite_title' => 'Titre de l’extrait',
|
||||
|
|
|
@ -34,6 +34,10 @@ return [
|
|||
'retry' => 'Relancer la génération de l’extrait',
|
||||
'delete' => 'Supprimer l’extrait',
|
||||
'logs' => 'Historique d’exécution',
|
||||
'messages' => [
|
||||
'createSuccess' => 'L’extrait vidéo a été créé avec succès !',
|
||||
'deleteSuccess' => 'L’extrait vidéo a bien été supprimé !',
|
||||
],
|
||||
'form' => [
|
||||
'title' => 'Nouvel extrait vidéo',
|
||||
'params_section_title' => 'Paramètres de l’extrait vidéo',
|
||||
|
|
|
@ -42,14 +42,17 @@ class BlockController extends Controller
|
|||
return redirect()
|
||||
->back()
|
||||
->withInput()
|
||||
->with('error', 'Actor not found.');
|
||||
->with('error', lang('Fediverse.messages.actorNotFound'));
|
||||
}
|
||||
|
||||
model('ActorModel')
|
||||
->blockActor($actor->id);
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
return redirect()->back()
|
||||
->with('message', lang('Fediverse.messages.blockActorSuccess', [
|
||||
'actor' => $handle,
|
||||
]));
|
||||
}
|
||||
|
||||
public function attemptUnblockActor(): RedirectResponse
|
||||
|
@ -68,7 +71,8 @@ class BlockController extends Controller
|
|||
model('ActorModel')
|
||||
->unblockActor((int) $this->request->getPost('actor_id'));
|
||||
|
||||
return redirect()->back();
|
||||
return redirect()->back()
|
||||
->with('message', lang('Fediverse.messages.unblockActorSuccess'));
|
||||
}
|
||||
|
||||
public function attemptBlockDomain(): RedirectResponse
|
||||
|
@ -84,10 +88,14 @@ class BlockController extends Controller
|
|||
->with('errors', $this->validator->getErrors());
|
||||
}
|
||||
|
||||
$domain = $this->request->getPost('domain');
|
||||
model('BlockedDomainModel')
|
||||
->blockDomain($this->request->getPost('domain'));
|
||||
->blockDomain($domain);
|
||||
|
||||
return redirect()->back();
|
||||
return redirect()->back()
|
||||
->with('message', lang('Fediverse.messages.blockDomainSuccess', [
|
||||
'domain' => $domain,
|
||||
]));
|
||||
}
|
||||
|
||||
public function attemptUnblockDomain(): RedirectResponse
|
||||
|
@ -103,9 +111,13 @@ class BlockController extends Controller
|
|||
->with('errors', $this->validator->getErrors());
|
||||
}
|
||||
|
||||
$domain = $this->request->getPost('domain');
|
||||
model('BlockedDomainModel')
|
||||
->unblockDomain($this->request->getPost('domain'));
|
||||
->unblockDomain($domain);
|
||||
|
||||
return redirect()->back();
|
||||
return redirect()->back()
|
||||
->with('message', lang('Fediverse.messages.unblockDomainSuccess', [
|
||||
'domain' => $domain,
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,12 +124,13 @@ class PostController extends Controller
|
|||
'published_at' => Time::now(),
|
||||
]);
|
||||
|
||||
if (! model('PostModel')->addPost($newPost)) {
|
||||
$postModel = model('PostModel');
|
||||
if (! $postModel->addPost($newPost)) {
|
||||
return redirect()
|
||||
->back()
|
||||
->withInput()
|
||||
// TODO: translate
|
||||
->with('error', "Couldn't create Post");
|
||||
->with('error', $postModel->errors());
|
||||
}
|
||||
|
||||
// Post without preview card has been successfully created
|
||||
|
|
|
@ -34,8 +34,13 @@
|
|||
],
|
||||
[
|
||||
'type' => 'link',
|
||||
'title' => lang('Episode.soundbites'),
|
||||
'uri' => route_to('soundbites-edit', $episode->podcast->id, $episode->id),
|
||||
'title' => lang('VideoClip.list.title'),
|
||||
'uri' => route_to('video-clips-list', $episode->podcast->id, $episode->id),
|
||||
],
|
||||
[
|
||||
'type' => 'link',
|
||||
'title' => lang('Soundbite.list.title'),
|
||||
'uri' => route_to('soundbites-list', $episode->podcast->id, $episode->id),
|
||||
],
|
||||
[
|
||||
'type' => 'separator',
|
||||
|
|
|
@ -99,8 +99,13 @@
|
|||
],
|
||||
[
|
||||
'type' => 'link',
|
||||
'title' => lang('Episode.soundbites'),
|
||||
'uri' => route_to('soundbites-edit', $podcast->id, $episode->id),
|
||||
'title' => lang('VideoClip.list.title'),
|
||||
'uri' => route_to('video-clips-list', $episode->podcast->id, $episode->id),
|
||||
],
|
||||
[
|
||||
'type' => 'link',
|
||||
'title' => lang('Soundbite.list.title'),
|
||||
'uri' => route_to('soundbites-list', $podcast->id, $episode->id),
|
||||
],
|
||||
[
|
||||
'type' => 'separator',
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
name="persons[]"
|
||||
label="<?= lang('Person.episode_form.persons') ?>"
|
||||
hint="<?= lang('Person.episode_form.persons_hint') ?>"
|
||||
options="<?= htmlspecialchars(json_encode($personOptions)) ?>"
|
||||
selected="<?= htmlspecialchars(json_encode(old('persons', []))) ?>"
|
||||
options="<?= esc(json_encode($personOptions)) ?>"
|
||||
selected="<?= esc(json_encode(old('persons', []))) ?>"
|
||||
required="true"
|
||||
/>
|
||||
|
||||
|
@ -39,8 +39,8 @@
|
|||
name="roles[]"
|
||||
label="<?= lang('Person.episode_form.roles') ?>"
|
||||
hint="<?= lang('Person.episode_form.roles_hint') ?>"
|
||||
options="<?= htmlspecialchars(json_encode($taxonomyOptions)) ?>"
|
||||
selected="<?= htmlspecialchars(json_encode(old('roles', []))) ?>"
|
||||
options="<?= esc(json_encode($taxonomyOptions)) ?>"
|
||||
selected="<?= esc(json_encode(old('roles', []))) ?>"
|
||||
required="true"
|
||||
/>
|
||||
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
value="<?= $person->unique_name ?>"
|
||||
label="<?= lang('Person.form.unique_name') ?>"
|
||||
hint="<?= lang('Person.form.unique_name_hint') ?>"
|
||||
required="true" />
|
||||
required="true"
|
||||
data-slugify="slug" />
|
||||
|
||||
<Forms.Field
|
||||
name="information_url"
|
||||
|
|
|
@ -107,13 +107,13 @@
|
|||
selected="<?= $podcast->category_id ?>"
|
||||
options="<?= esc(json_encode($categoryOptions)) ?>"
|
||||
required="true" />
|
||||
|
||||
|
||||
<Forms.Field
|
||||
as="MultiSelect"
|
||||
name="other_categories[]"
|
||||
label="<?= lang('Podcast.form.other_categories') ?>"
|
||||
selected="<?= json_encode($podcast->other_categories_ids) ?>"
|
||||
data-max-item-count="2"
|
||||
selected="<?= esc(json_encode($podcast->other_categories_ids)) ?>"
|
||||
options="<?= esc(json_encode($categoryOptions)) ?>" />
|
||||
|
||||
<fieldset class="mb-4">
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<?= csrf_field() ?>
|
||||
|
||||
<Forms.Field
|
||||
as="MultiSelect"
|
||||
id="roles"
|
||||
name="roles[]"
|
||||
label="<?= lang('User.form.roles') ?>"
|
||||
|
@ -26,7 +27,7 @@
|
|||
options="<?= esc(json_encode($roleOptions)) ?>"
|
||||
selected="<?= esc(json_encode($user->roles)) ?>" />
|
||||
|
||||
<Button variant="primary" type="submit" class="self-end"><?= lang('User.form.submit_edit') ?></Button>
|
||||
<Button variant="primary" type="submit" class="self-end mt-4"><?= lang('User.form.submit_edit') ?></Button>
|
||||
|
||||
</form>
|
||||
|
||||
|
|
Loading…
Reference in New Issue