@extends('_version_01.commons.layouts.admin') @section('content') {!! Form::model($model, ['class'=>'form-horizontal',"files"=>true]) !!} @include('_version_01.commons.layouts.partials._alert') {!!Form::hidden('language_listing', $language_listing, ['id'=>'language_listing' , 'value'=>$language_listing]) !!}

@php $is_first = true; @endphp @foreach($language_listing as $key => $value) @php if(isset($model['description'])){ $description = json_decode($model['description']); $description_referal = 'description_'.$key; } if(isset($model['content'])){ $content = json_decode($model['content']); $content_referal = 'content_'.$key; } if(isset($model['title'])){ $title = json_decode($model['title']); echo 'title_'.$key."
"; $title_referal = 'title_'.$key; } if(isset($model['share_title'])){ $share_title =json_decode($model['share_title']); $share_title_referal = 'share_title_'.$key; } if(isset($model['share_description'])){ $share_description = json_decode($model['share_description']); $share_description_referal = 'share_description_'.$key; } @endphp
{!! Form::label('title', App\Language::trans('Title ['.$value.']'), ['class'=>'control-label col-md-10']) !!}
{!! Form::text("title_".$key, isset($model['title']) ? (isset($title->$title_referal) ? $title->$title_referal : '' ) : '' , ['id'=>"title_".$key, 'rows'=>'10' , 'cols'=>'80','class'=>'form-control']) !!} {!!$errors->first('title', '')!!}
{!! Form::label('share_title', App\Language::trans('Share Title ['.$value.']'), ['class'=>'control-label col-md-10']) !!}
{!! Form::text("share_title_".$key, isset($model['share_title']) ? (isset($share_title->$share_title_referal) ? $share_title->$share_title_referal: '' ) : '', ['id'=>"share_title_".$key, 'rows'=>'10' , 'cols'=>'80','class'=>'form-control']) !!} {!!$errors->first('share_title', '')!!}
{!! Form::label('share_description', App\Language::trans('Share Description ['.$value.']'), ['class'=>'control-label col-md-10']) !!}
{!! Form::text("share_description_".$key, isset($model['share_title']) ? (isset($share_description->$share_description_referal) ? $share_description->$share_description_referal : '' ): '', ['id'=>"share_description_".$key, 'rows'=>'10' , 'cols'=>'80','class'=>'form-control']) !!} {!!$errors->first('share_description', '')!!}
{{App\Language::trans('Share title and share description will be display while user share the article to social media.')}}
{!! Form::label('description', App\Language::trans('Content ['.$value.']'), ['class'=>'control-label col-md-10']) !!}
{!! Form::textarea("content_".$key, isset($model['content']) ? (isset($content->$content_referal) ? $content->$content_referal : '' ) : '', ['id'=>"content_".$key, 'rows'=>'10' , 'cols'=>'80','class'=>'form-control tinymce']) !!} {!!$errors->first('content', '')!!}
@php $is_first = false; @endphp @endforeach
{{App\Language::trans('Post Detail')}}

{!! Form::label('is_publish', App\Language::trans('Is Publish ?'), ['class'=>'control-label col-md-2']) !!}
{!!$errors->first('is_publish', '')!!}
{!! Form::label('status', App\Language::trans('Status ?'), ['class'=>'control-label col-md-2']) !!}
{!!$errors->first('status', '')!!}
{!! Form::label('product_category_id', App\Language::trans('Category'), ['class'=>'control-label col-md-4']) !!}
{!!Form::select("article_post_category_ids[]", App\ArticlePostCategory::combobox(), (strlen($model->article_post_category_ids) > 1 ? json_decode($model->article_post_category_ids,true):null), array("style"=>"width: 100%;","class"=>"form-control 3col active","id"=>"article_post_category_ids","multiple"=>"multiple"))!!} {!!$errors->first('product_category_id', '')!!}
{!!Form::text("hashtag", null, array("id"=>"hashtag","class"=>"form-control"))!!} {!!$errors->first('hashtag', ':message')!!}
{!! Form::label('datetimes', App\Language::trans('Period'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('datetimes', null, ['class'=>'form-control input-datetimespicker','required']) !!} {!!$errors->first('datetimes', '')!!}
@if($model->cover_photo_path)
@endif
{!!Form::file("cover_photo_path", array("id"=>"cover_photo_path","class"=>"form-control"))!!} {!!$errors->first('cover_photo_path', ':message')!!}
{!! Form::label('country_id', App\Language::trans('Country'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('country_id',App\Country::combobox(old('country_id') ? old('country_id'):$model->country_id), null, ['class'=>'form-control','autofocus','required','onchange'=>'init_state_selectbox(this)']) !!} {!!$errors->first('country_id', '')!!}
{!! Form::label('state_id', App\Language::trans('State'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('state_id', App\State::combobox(old('country_id') ? old('country_id'):$model->country_id) , null, ['class'=>'form-control','required']) !!} {!!$errors->first('state_id', '')!!}
@include('_version_01.commons.layouts.partials._form_floaring_footer_standard') {!! Form::close() !!} @endsection @section('script') @endsection