{{ csrf_field() }}

{!! Form::label('title', 'Titolo:') !!} {{isset($news) ? 100 - strlen($news->title) : 100}} caratteri rimanenti {!! Form::text('title', null, array('class' => 'form-control title', 'maxlength' => 100)) !!}
{!! Form::label('title_region_1', 'Titolo regione 1:') !!} {{isset($news) ? 100 - strlen($news->title_region_1) : 100}} caratteri rimanenti {!! Form::text('title_region_1', null, array('class' => 'form-control title_region_1', 'maxlength' => 100)) !!}
{!! Form::label('title_region_2', 'Titolo regione 2:') !!} {{isset($news) ? 100 - strlen($news->title_region_2) : 100}} caratteri rimanenti {!! Form::text('title_region_2', null, array('class' => 'form-control title_region_2', 'maxlength' => 100)) !!}
{!! Form::label('homepage_position', 'Posizione primo piano:') !!} {!! Form::select('homepage_position', ['' => '', 'slide1' => 'Apertura', 'left1' => 'Slide Sinistra 1', 'left2' => 'Slide Sinistra 2', 'left3' => 'Slide Sinistra 3', 'right1' => 'Slide Destra 1', 'right2' => 'Slide Destra 2', 'right3' => 'Slide Destra 3'], null, ['class' => 'form-control']) !!}
{!! Form::label('aaa', 'News attualmente in primo piano:') !!}
    {!! @$first !!}
{!! Form::label('section_id', 'Sezione:') !!} {!! Form::select('section_id', [''=>''] + $sections, null, ['class' => 'form-control section_id_change']) !!}
{!! Form::label('region_1_id', 'Regione 1:') !!} {!! Form::select('region_1_id', [''=>''] + $regions, null, ['class' => 'form-control region_1_id_change']) !!}
{!! Form::label('region_2_id', 'Regione 2:') !!} {!! Form::select('region_2_id', [''=>''] + $regions, null, ['class' => 'form-control region_2_id_change']) !!}
@if(isset($news)) @if(($news->section_id > 0 && $news->section_position != '') || (!$news->online && $news->section_id > 0))
@else
{!! isset($news->section) ? $news->section->position($news->id) : ''!!}
@endif @else
@endif @if(isset($news)) @if(($news->region_1_id > 0 && $news->region_1_position != '') || (!$news->online && $news->region_1_id > 0))
@else
{!! isset($news->region_1) ? $news->region_1->position($news->id) : ''!!}
@endif @else
@endif @if(isset($news)) @if(($news->region_2_id > 0 && $news->region_2_position != '') || (!$news->online && $news->region_2_id > 0))
@else
{!! isset($news->region_2) ? $news->region_2->position($news->id) : ''!!}
@endif @else
@endif
{!! Form::label('event_id', 'Evento:') !!} {!! Form::select('event_id', [null => ''] + $events, null, ['class' => 'form-control']) !!}
{!! Form::label('page_id', 'Pagina WEB:') !!} {!! Form::select('page_id', [null => ''] + $pages, null, ['class' => 'form-control']) !!}
{!! Form::label('text_short', 'Testo breve:') !!} {!! Form::text('text_short', null, array('class' => 'form-control', 'maxlength' => '100')) !!}
{!! Form::label('date', 'Data:') !!} {!! Form::text('date', isset($news) ? null : date("d/m/Y H:i"), array('class' => 'form-control')) !!}
{!! Form::label('text', 'Testo:') !!} {!! Form::textarea('text', null, array('rows' => 30, 'cols' => 100, 'class' => 'form-control js-editor')) !!}
@if(isset($news))
{!! Form::label('image', 'Immagine principale:') !!}
{!! Form::submit('Sostituisci immagine', ['class'=>'btn btn-success', 'name' => 'crop']) !!} @if(false)
{!! Form::file('image', null, array('class' => 'form-control')) !!}
@endif @if (isset($news) && $news->image != '')
@endif @if (isset($_GET["filename"]))
@endif
{!! Form::label('image1', 'Immagine 1:') !!}
{!! Form::file('image1', null, array('class' => 'form-control')) !!}
@if (isset($news) && $news->image1 != '')
@endif
{!! Form::label('image2', 'Immagine 2:') !!}
{!! Form::file('image2', null, array('class' => 'form-control')) !!}
@if (isset($news) && $news->image2 != '')
@endif
{!! Form::label('image3', 'Immagine 3:') !!}
{!! Form::file('image3', null, array('class' => 'form-control')) !!}
@if (isset($news) && $news->image3 != '')
@endif
{!! Form::label('image4', 'Immagine 4:') !!}
{!! Form::file('image4', null, array('class' => 'form-control')) !!}
@if (isset($news) && $news->image4 != '')
@endif
{!! Form::label('image5', 'Immagine 5:') !!}
{!! Form::file('image5', null, array('class' => 'form-control')) !!}
@if (isset($news) && $news->image5 != '')
@endif
{!! Form::label('video', 'Video:') !!} {!! Form::textarea('video', null, array('rows' => 5, 'cols' => 50, 'class' => 'form-control')) !!}
{!! Form::label('pdf', 'PDF:') !!}
{!! Form::file('pdf', null, array('class' => 'form-control')) !!}
@if (isset($news) && $news->pdf != '')
Visualizza   Rimuovi @endif
{!! Form::label('meta_title', 'Meta - Titolo:') !!} {!! Form::text('meta_title', null, array('class' => 'form-control')) !!}
{!! Form::label('meta_keywords', 'Meta - Parole chiave:') !!} {!! Form::text('meta_keywords', null, array('class' => 'form-control')) !!}
{!! Form::label('meta_description', 'Meta - Descrizione:') !!} {!! Form::textarea('meta_description', null, array('rows' => 5, 'cols' => 50, 'class' => 'form-control')) !!}
{!! Form::label('slug', 'Slug:') !!} {!! Form::text('slug', null, array('class' => 'form-control slug')) !!}
{!! Form::label('no_social', 'Selezionando questo flag la news NON viene pubblicata su Facebook/Twitter ma solamente sul sito:') !!}
{!! Form::checkbox('no_social', 'on', null) !!}
{!! Form::label('live', 'Live:') !!}
{!! Form::checkbox('live', 'on', null) !!}
{!! Form::label('breaking_news', 'Breaking news:') !!}
{!! Form::checkbox('breaking_news', 'on', null) !!}
@else
{!! Form::label('image', 'Immagine principale:') !!}
{!! Form::file('image', null, array('class' => 'form-control')) !!}
@if (isset($_GET["filename"]))
@endif
@if (!isset($_GET["filename"]))
{!! Form::label('breaking_news', 'Breaking news:') !!}
{!! Form::checkbox('breaking_news', 'on', isset($_GET["filename"]) ? false : true) !!}
@endif
@endif
@section('extra_css') @stop @section('extra_js') @stop