@extends('admin.layout.base') @section('content') @php $form = new \App\Http\Controllers\FormCtrl(); @endphp

@if($object == NULL) Crea @else Modifica @endif News

  TORNA ALL'ELENCO @if($object != NULL && isset($object->path)) PAGINA PUBBLICA @endif @if($object != NULL)   GESTIONE CONTENUTI @endif
@if(isset($_REQUEST['error']))
Attenzione Il titolo della news è già stato utilizzato.
@endif @if(count($languages) > 0) @if(count($languages) > 1) @endif @for($l = 0; $l < count($languages); $l++) @php $lang_id = $languages[$l]->id; $boxlang = NULL; if($object != NULL && $l > 0) { $boxlang = isset($object->translations[$lang_id]) ? $object->translations[$lang_id] : NULL; } else if($object != NULL) $boxlang = $object; $boxClass = (!$languages[$l]->selected ? " displaynone" : ""); @endphp @if(count($languages) > 1)
@endif @php $value = str_replace('"', '"', (($boxlang != NULL) ? $boxlang->title : '')); echo $form->insertTextInputField("Titolo", "title_".$lang_id, $value, "", "#555", ($l == 0), 0, 0, 255); $value = str_replace('"', '"', (($boxlang != NULL) ? $boxlang->alias : '')); echo $form->insertTextInputField("Alias", "alias_".$lang_id, $value, "", "#555", false, 0, 0, 255); $value = str_replace('"', '"', (($boxlang != NULL) ? $boxlang->subtitle : '')); echo $form->insertTextareaInputField("Sottotitolo", "subtitle_".$lang_id, $value, "", "#666666", false, 0, 0, 1000, false, false, false); $value = str_replace('"', '"', (($boxlang != NULL) ? $boxlang->didascalia : '')); echo $form->insertTextareaInputField("Didascalia", "didascalia_".$lang_id, $value, "", "#666666", false, 0, 0, 1000, false, false, false); @endphp @if(count($languages) > 1)
@endif @endfor @endif {!!$form->insertSelectField('Luogo', 'place_id', 0, 'Seleziona', ($object != NULL && !empty($object) ? $object->place_id : 0), false, $places, "resetStepSelect(this.id)");!!} @php $value = str_replace('"', '"', ($object != NULL ? $object->date_at : '')); if($value != '') $value = date("d/m/Y", strtotime($value)); echo $form->insertTextInputField("Data", "date_at", $value, "", "#666666", true, 5, 0, 50, false, false); @endphp
@include('admin.page.form.file', array( 'index' => 1, 'placeholder' => 'Cover', 'field' => 'cover', 'base_img_url' => asset('img/eventi/thumb/'), 'singleimage' => true, 'dimension' => 'W: 1200', 'extensions' => 'jpg, jpeg, gif, png' )) @php $element = array(); $obj = (object)[]; $obj->checked = ($object == NULL || ($object != NULL && $object->outside == 1)); $obj->value = 1; $obj->text = "Selezione per abilitare la visualizzazione completa della cover"; array_push($element, $obj); echo $form->insertCheckboxGroup(" ", "outside", $element, 0, count($element), 0, false, true, true, true); @endphp
@php $element = array(); $obj = (object)[]; $obj->checked = ($object == NULL || ($object != NULL && $object->registration == 1)); $obj->value = 1; $obj->text = "Selezione per abilitare la registrazione all'evento"; array_push($element, $obj); echo $form->insertCheckboxGroup(" ", "registration", $element, 0, count($element), 0, false, true, true, true); $value = str_replace('"', '"', ($object != NULL ? $object->external_url : '')); echo $form->insertTextInputField("URL", "external_url", $value, "", "#555", false, 0, 0, 255); $value = str_replace('"', '"', ($object != NULL ? $object->end_registration : '')); if($value != '') $value = date("d/m/Y", strtotime($value)); echo $form->insertTextInputField("Chiusura registrazione", "end_registration", $value, "", "#666666", false, 5, 0, 50, false, false); @endphp
@php $element = array(); $obj = (object)[]; $obj->checked = ($object == NULL || ($object != NULL && $object->published == 1)); $obj->value = 1; $obj->text = "Selezione per abilitare la visualizzazione dell'evento"; array_push($element, $obj); echo $form->insertCheckboxGroup(" ", "published", $element, 0, count($element), 0, false, true, true, true); @endphp
@stop