<?php $__env->startSection('style'); ?>
    <link rel="stylesheet" href="<?php echo e(asset('assets/backend/css/summernote-bs4.css')); ?>">
<?php $__env->stopSection(); ?>
<?php $__env->startSection('site-title'); ?>
    <?php echo e(__('Edit Page')); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <div class="col-lg-12 col-ml-12 padding-bottom-30">
        <div class="row">
            <div class="col-lg-12">
                <div class="margin-top-40"></div>
                <?php echo $__env->make('backend/partials/message', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                <?php if($errors->any()): ?>
                    <div class="alert alert-danger">
                        <ul>
                            <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li><?php echo e($error); ?></li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                    </div>
                <?php endif; ?>
            </div>
            <div class="col-lg-12 mt-5">
            <div class="card">
                <div class="card-body">
                    <div class="header-wrap">
                        <h4 class="header-title"><?php echo e(__('Edit Page')); ?>

                            <a href="<?php echo e(route('admin.page')); ?>" class="btn btn-primary btn-sm pull-right"><i class="fas fa-angle-double-left"></i><?php echo e(__('All Pages')); ?></a>
                        </h4>

                    </div>
                    <form action="<?php echo e(route('admin.page.update',$page_post->id)); ?>" method="post" enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        <div class="row">
                            <div class="col-lg-8">
                                <div class="form-group">
                                    <label><?php echo e(__('Language')); ?></label>
                                    <select name="lang" id="language" class="form-control"style="height:42px;">
                                        <?php $__currentLoopData = $all_languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option <?php if($page_post->lang == $lang->slug): ?> selected <?php endif; ?> value="<?php echo e($lang->slug); ?>"><?php echo e($lang->name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="title"><?php echo e(__('Title')); ?></label>
                                    <input type="text" class="form-control"  id="title" name="title" value="<?php echo e($page_post->title); ?>">
                                </div>
                                <div class="form-group">
                                    <label for="slug"><?php echo e(__('Slug')); ?></label>
                                    <input type="text" class="form-control"  name="slug" value="<?php echo e($page_post->slug); ?>">
                                </div>
                                <div class="form-group">
                                    <label><?php echo e(__('Content')); ?></label>
                                    <input type="hidden" name="page_content" value="<?php echo e($page_post->content); ?>">
                                    <div class="summernote" data-content='<?php echo e($page_post->content); ?>'></div>
                                </div>
                            </div>
                            <div class="col-lg-4">
                                <div class="form-group">
                                    <label><?php echo e(__('Status')); ?></label>
                                    <select name="status" id="status" class="form-control">
                                        <option value="publish"><?php echo e(__('Publish')); ?></option>
                                        <option value="draft"><?php echo e(__('Draft')); ?></option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="meta_title"><?php echo e(__('Page Meta Title')); ?></label>
                                    <input type="text" name="meta_title"  class="form-control" value="<?php echo e($page_post->meta_title); ?>">
                                </div>
                                <div class="form-group">
                                    <label for="meta_tags"><?php echo e(__('Page Meta Tags')); ?></label>
                                    <input type="text" name="meta_tags"  class="form-control" value="<?php echo e($page_post->meta_tags); ?>" data-role="tagsinput" id="meta_tags">
                                </div>
                                <div class="form-group">
                                    <label for="meta_description"><?php echo e(__('Page Meta Description')); ?></label>
                                    <textarea name="meta_description"  class="form-control" id="meta_description"><?php echo e($page_post->meta_description); ?></textarea>
                                </div>
                                <button type="submit" class="btn btn-primary mt-4 pr-4 pl-4"><?php echo e(__('Update Page')); ?></button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        </div>
    </div>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
    <script src="<?php echo e(asset('assets/backend/js/summernote-bs4.js')); ?>"></script>
    <script>
        $(document).ready(function () {
            $('.summernote').summernote({
                height: 400,   //set editable area's height
                codemirror: { // codemirror options
                    theme: 'monokai'
                },
                callbacks: {
                    onChange: function(contents, $editable) {
                        $(this).prev('input').val(contents);
                    }
                }
            });
            if($('.summernote').length > 0){
                  $('.summernote').each(function(index,value){
                      $(this).summernote('code', $(this).data('content'));
                  });
              }
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('backend.admin-master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/xgenxchi/public_html/laravel/zixer/@core/resources/views/backend/pages/page/edit.blade.php ENDPATH**/ ?>