@include('admin.partials.errors')
@if(isset($carouselSlide))
{{ Form::model($carouselSlide->getFillables(), ['route' => ['carousels-slides.update', $carouselSlide->id], 'method' => 'PUT']) }}
@else
{{ Form::open(['route' => ['carousels-slides.store', $carousel->id], 'class' => 'medias-creation']) }}
@endif
{{ FormField::info(['label' => 'Carousel', 'info' => $carousel->adminName]) }}
{{ FormField::select(['options' => $pages, 'name' => 'page_id', 'label' => 'Page liée', 'errors' => $errors]) }}
@foreach($languages as $l)
{{ FormField::checkbox(['value' => 1, 'name' => 'published_'.$l->short, 'label' => 'Publié', 'errors' => $errors]) }}
{{ FormField::text(['name' => 'title_'.$l->short, 'label' => 'Titre', 'errors' => $errors]) }}
{{ FormField::text(['name' => 'sub_title_'.$l->short, 'label' => 'Sous-titre', 'errors' => $errors]) }}
{{ FormField::textarea(['name' => 'description_'.$l->short, 'label' => 'Description', 'errors' => $errors]) }}
{{ FormField::text(['name' => 'button_'.$l->short, 'label' => 'Label du bouton', 'errors' => $errors]) }}
{{ FormField::text(['name' => 'url_'.$l->short, 'label' => 'URL du bouton', 'errors' => $errors, 'class' => 'url-container', 'tooltip' => 'L\'URL est à indiquer si aucune page n\'a été sélectionnée']) }}
{{ FormField::select(['options' => targetsList(), 'name' => 'target_'.$l->short, 'label' => 'Ouvrir le lien', 'errors' => $errors]) }}
@endforeach
{{ FormField::buttons(['index' => $carousel->adminRoute , 'label' => isset($carouselSlide) ? 'Modifier' : 'Enregistrer']) }}
{{ Form::close() }}