
<?php $__env->startSection('content'); ?>
<div class='bg-white p-2 rounded m-2'>
    <div class="row justify-content-between p-3 rounded m-2  bg-light">
        <div class="col-12 col-md-6 align-self-center">
            <a class='text-decoration-none fw-bold ' href="<?php echo e(url('/home')); ?>"><?php echo e(trans('admin.Home')); ?>  </a> <span class="bi bi-caret-right-fill"></span>
            <a class='text-decoration-none fw-bold' href="<?php echo e(url('/pages')); ?>" ><?php echo e(trans('admin.pages')); ?></a><span class="bi bi-caret-right"></span>
            <span> <?php if(Auth::user()->locale == 'en'): ?> <?php echo e($page_name = $post->name_en); ?> <?php else: ?> <?php echo e($page_name = $post->name_ar); ?> <?php endif; ?></span>
            
        </div>
    </div>
</div>
<div class="container-fluid">
    <div class="row rounded border m-2 p-2">
        <div class="col-md-12">
            <?php if(session()->has('success')): ?>
                <div class="bg-success p-2 mt-4 rounded text-white">
                    <span class="input-error"><?php echo e(session()->get('success')); ?></span>
                </div>
            <?php elseif(session()->has('error')): ?>
                <div class="bg-danger p-2 mt-4 rounded text-white">
                    <span class="input-error"><?php echo e(session()->get('error')); ?></span>
                </div>
            <?php endif; ?>
        </div>
        <div class="col-md-12">
            <div>
                <form action="<?php echo e(route('pages_update')); ?>" method="post" enctype="multipart/form-data">
                    <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
                    <input type="hidden" name="id" id="id" value="<?php echo e($post->id); ?>">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="mb-3">
                                <label for="name" class="form-label"><?php echo e(trans('admin.page_name')); ?></label>
                                <input type="text" class="form-control rounded-pill bg-light_c border-0" id="name" name="name" placeholder="<?php echo e(trans('admin.page_name')); ?>" aria-describedby="emailHelp" value="<?php echo e($page_name); ?>" readonly>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="mb-3">
                                <label for="title_en" class="form-label"><?php echo e(trans('admin.title_en')); ?></label>
                                <input type="text" class="form-control rounded-pill bg-light_c border-0 <?php $__errorArgs = ['title_en'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="title_en" name="title_en" placeholder="<?php echo e(trans('admin.title')); ?>" aria-describedby="emailHelp" value="<?php echo e($post->title_en); ?>">
                                <?php $__errorArgs = ['title_en'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> 
                                    <span class="text-danger"><?php echo e($message); ?></span> 
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="mb-3">
                                <label for="title_ar" class="form-label"><?php echo e(trans('admin.title_ar')); ?></label>
                                <input type="text" class="form-control rounded-pill bg-light_c border-0 <?php $__errorArgs = ['title_ar'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="title_ar" name="title_ar" placeholder="<?php echo e(trans('admin.title')); ?>" aria-describedby="emailHelp" value="<?php echo e($post->title_ar); ?>">
                                <?php $__errorArgs = ['title_ar'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> 
                                    <span class="text-danger"><?php echo e($message); ?></span> 
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="mb-3">
                                <label for="username" class="form-label"><?php echo e(trans('admin.content_en')); ?></label>
                                <textarea id="text_en" name="text_en" class="form-control bg-light_c border-0 rounded cat <?php $__errorArgs = ['text_en'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" rows="12" placeholder="<?php echo e(trans('admin.content_en')); ?>"><?php echo $post->content_en; ?></textarea>
                                <?php $__errorArgs = ['text_en'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> 
                                    <span class="text-danger"><?php echo e($message); ?></span> 
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="mb-3">
                                <label for="username" class="form-label"><?php echo e(trans('admin.content_en')); ?></label>
                                <textarea id="text_ar" name="text_ar" class="form-control bg-light_c border-0 rounded cat <?php $__errorArgs = ['text_ar'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" rows="12" placeholder="<?php echo e(trans('admin.content_en')); ?>"><?php echo $post->content_ar; ?></textarea>
                                <?php $__errorArgs = ['text_ar'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> 
                                    <span class="text-danger"><?php echo e($message); ?></span> 
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <!-- switch start  -->
                            <div class="d-flex  mob_just pt-2 my-3">
                                <label for="status" class="ms-2 mb-1"><?php echo e(trans('admin.status')); ?></label>
                                <label class="switch ms-5">
                                    <input type="checkbox" name="status" id="status" value="1" <?php if($post->status == 1): ?> checked <?php endif; ?>>
                                    <div class="slider round">
                                        <!--ADDED HTML -->
                                        <span class="on"><?php echo e(trans('admin.on')); ?></span>
                                        <span class="off"><?php echo e(trans('admin.off')); ?></span>
                                    </div>
                                </label>
                            </div>
                            <!-- switch end  -->
                            <button type='sumbit' class='btn btn-success btn-color rounded-pill text-light px-5 mt-lg-3 my-2'><?php echo e(trans('admin.update')); ?></button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script>
    CKEDITOR.replace('text_en');
    CKEDITOR.replace('text_ar');
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layout.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\HomesteadStuff\code\manage_sarfapp\resources\views/admin/manage_pages/edit.blade.php ENDPATH**/ ?>