@section('title', __('site.page_post_edit_title')) @section('head') @endsection @include('includes/header') @include('includes/topSite')

{{ __('site.page_post_edit_h1') }}

@php if (\Session::has('error_title')) { $inputTitle = ''; } else { $inputTitle = old('title', htmlspecialchars_decode($dataPost->title)); } @endphp @if (\Session::has('error_title'))
{!! \Session::get('error_title') !!}
@endif
@php if (\Session::has('error_short')) { $inputShort = ''; } else { $inputShort= old('short_text', htmlspecialchars_decode($dataPost->short_text)); } @endphp @if (\Session::has('error_short'))
{!! \Session::get('error_short') !!}
@endif

@php $selectedVisibility = old('visibility', $dataPost->status); @endphp
@php $now = now(); $oldSchedule = old('schedule_time'); $value = ($oldSchedule && \Carbon\Carbon::parse($oldSchedule)->greaterThan($now)) ? $oldSchedule : $dataPost->schedule_timestamp ?? $now->format('Y-m-d\TH:i'); @endphp
@php $selectedAllowComments = old('allow_comments', $dataPost->allow_comments ?? '1'); @endphp

@php if (\Session::has('error_cat')) { $selectedCategories = []; } else { $selectedCategories = old('categories', $expCategories ?? []); } @endphp
@foreach($getCategories as $category)
id, $selectedCategories) ? 'checked' : '' }} >
@endforeach @if (\Session::has('error_cat'))
{!! \Session::get('error_cat') !!}
@endif
{{ __('site.page_post_new_side_grid2_link') }}

{{ str_replace('%1%','800x450',str_replace('%2%','2',__('site.page_post_new_side_grid3_desc'))) }}
@include('includes/footer')