@extends('admins.layouts.index') @section('content') {!! Form::model($model, ['method'=>'post','class'=>'form-horizontal','files'=>true]) !!}

{{__('Header Images')}}

@if($model->header_image_path)
@endif
@foreach(App\Translation::get_lang_array() as $index => $row) @php $data = $model->getFormTranslation($row->lang); @endphp
{{ __('Basic Information') }}
{!! Form::label('locale['.$row->lang.'][title]', __('Title'), ['class'=>'col-sm-3 col-form-label text-right']) !!}
{!! Form::text('locale['.$row->lang.'][title]', $model->id ? (isset($data['title']) ? $data['title']:null):null, ['id'=>'locale['.$row->lang.'][title]','class'=>'form-control '.($errors->first('locale.*.title') ? 'is-invalid' : ''), $index == 0 ? 'autofocus':'']) !!} {!!$errors->first('locale.*.title', ':message')!!}
{!! Form::label('locale['.$row->lang.'][keywords]', __('Keywords'), ['class'=>'col-sm-3 col-form-label text-right']) !!}
{!! Form::text('locale['.$row->lang.'][keywords]', $model->id ? (isset($data['keywords']) ? $data['keywords']:null):null, ['id'=>'locale['.$row->lang.'][keywords]','class'=>'form-control '.($errors->first('locale.*.keywords') ? 'is-invalid' : ''), $index == 0 ? 'autofocus':'']) !!} {!!$errors->first('locale.*.keywords', ':message')!!}
{!! Form::label('locale['.$row->lang.'][description]', __('Description'), ['class'=>'col-sm-2 col-form-label text-right']) !!}
{!! Form::textarea('locale['.$row->lang.'][description]', $model->id ? (isset($data['description']) ? $data['description']:null):null, ['id'=>'locale['.$row->lang.'][description]','class'=>'textarea form-control '.($errors->first('locale.*.description') ? 'is-invalid' : ''), $index == 0 ? 'autofocus':'']) !!} {!!$errors->first('locale.*.description', ':message')!!}
{!! Form::label('locale['.$row->lang.'][tags]', __('Tags'), ['class'=>'col-sm-3 col-form-label text-right']) !!}
{!! Form::text('locale['.$row->lang.'][tags]', $model->id ? (isset($data['tags']) ? $data['tags']:null):null, ['id'=>'tags_'.$row->lang,'class'=>'form-control '.($errors->first('locale.*.tags') ? 'is-invalid' : ''), $index == 0 ? 'autofocus':'']) !!} {!!$errors->first('locale.*.tags', ':message')!!}
@endforeach

{{__('Other Information')}}

{!! Form::label('header_image_path', __('Header Image'), ['class'=>'col-sm-4 col-form-label text-right']) !!}
{!! Form::file('header_image_path', ['id'=>'header_image_path','class'=>'form-control '.($errors->first('header_image_path') ? 'is-invalid' : ''),'placeholder'=>__('Header Image')]) !!} {!!$errors->first('header_image_path', ':message')!!}
{!! Form::label('category_id', __('Category'), ['class'=>'col-sm-4 col-form-label text-right']) !!}
{!! Form::select('category_id', App\BlogCategory::combobox(), null, ['id'=>'category_id','class'=>'form-control select2 '.($errors->first('category_id') ? 'is-invalid' : ''),'style'=>'width: 100%;']) !!} {!!$errors->first('category_id', ':message')!!}
{!! Form::label('published_at', __('Published At'), ['class'=>'col-sm-4 col-form-label text-right']) !!}
{!! Form::text('published_at', $model->id ? $model->published_at:$model->date_displayed('now'), ['id'=>'published_at','class'=>'datepicker form-control '.($errors->first('published_at') ? 'is-invalid' : ''),'placeholder'=>__('Published At')]) !!} {!!$errors->first('published_at', ':message')!!}
{!! Form::close() !!} @endsection @section('script') @endsection