@extends('layouts.app') @section('content')

@lang('global.content-pages.title')

{!! Form::model($content_page, ['method' => 'PUT', 'route' => ['admin.content_pages.update', $content_page->id], 'files' => true,'class'=>'formvalidation']) !!}
@lang('global.app_edit')
{!! Form::label('title', trans('global.content-pages.fields.title').'*', ['class' => 'control-label form-label']) !!}
{!! Form::text('title', old('title'), ['class' => 'form-control', 'placeholder' => 'Title', 'required' => '']) !!}

@if($errors->has('title'))

{{ $errors->first('title') }}

@endif
{!! Form::label('category_id', trans('global.content-pages.fields.category-id').'', ['class' => 'control-label']) !!} {!! Form::select('category_id[]', $category_ids, old('category_id') ? old('category_id') : $content_page->category_id->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-category_id' ]) !!}

@if($errors->has('category_id'))

{{ $errors->first('category_id') }}

@endif
{!! Form::label('tag_id', trans('global.content-pages.fields.tag-id').'', ['class' => 'control-label']) !!} {!! Form::select('tag_id[]', $tag_ids, old('tag_id') ? old('tag_id') : $content_page->tag_id->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-tag_id' ]) !!}

@if($errors->has('tag_id'))

{{ $errors->first('tag_id') }}

@endif
@if($content_page->featured_image && file_exists(public_path() . '/thumb/' . $content_page->featured_image)) @endif
{!! Form::label('featured_image', trans('global.content-pages.fields.featured-image').'', ['class' => 'control-label']) !!} {!! Form::file('featured_image', ['class' => 'form-control', 'style' => 'margin-top: 4px;']) !!} {!! Form::hidden('featured_image_max_size', 10) !!} {!! Form::hidden('featured_image_max_width', 1000) !!} {!! Form::hidden('featured_image_max_height', 1000) !!}

{{trans('others.global_file_types_gallery')}}

@if($errors->has('featured_image'))

{{ $errors->first('featured_image') }}

@endif
{!! Form::label('excerpt', trans('global.content-pages.fields.excerpt').'', ['class' => 'control-label']) !!} {!! Form::textarea('excerpt', old('excerpt'), ['class' => 'form-control ', 'placeholder' => 'Excerpt','rows'=>'4']) !!}

@if($errors->has('excerpt'))

{{ $errors->first('excerpt') }}

@endif
{!! Form::label('page_text', trans('global.content-pages.fields.page-text').'', ['class' => 'control-label']) !!} {!! Form::textarea('page_text', old('page_text'), ['class' => 'form-control editor', 'placeholder' => 'Page Text']) !!}

@if($errors->has('page_text'))

{{ $errors->first('page_text') }}

@endif
{!! Form::submit(trans('global.app_update'), ['class' => 'btn btn-danger wave-effect']) !!} {!! Form::close() !!} @stop @section('javascript') @parent @include('admin.common.standard-ckeditor') @stop