<?php $__env->startSection('title', 'Edit Data Halaman'); ?>

<?php $__env->startSection('content'); ?>
    <div class="page-content">
        <nav class="page-breadcrumb">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">Dashboard</a></li>
                <li class="breadcrumb-item"><a href="<?php echo e(route('pages')); ?>">Data Pages</a></li>
                <li class="breadcrumb-item active" aria-current="page">Edit Page</li>
            </ol>
        </nav>
        <div class="row">
            <div class="stretch-card">
                <div class="card">
                    <div class="card-body">
                        <h4 class="card-title">Edit Page</h4>

                        <?php if($errors->any()): ?>
                            <div id="error-alert" class="alert alert-danger">
                                <strong>Terjadi Kesalahan!</strong>
                                <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; ?>

                        <form method="POST" action="<?php echo e(route('pages.update', $page->page_id)); ?>">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('PUT'); ?>

                            <input type="hidden" name="token" value="<?php echo e($token); ?>">
                            <input type="hidden" name="security" value="<?php echo e(md5($token . $secret_key)); ?>">

                            <div class="form-group">
                                <label class="form-label">Judul</label>
                                <input type="text" class="form-control mb-3" name="judul" value="<?php echo e($page->judul); ?>"
                                    required>
                            </div>

                            <div class="form-group">
                                <label class="form-label">Ringkasan</label>
                                <input type="text" class="form-control mb-3" name="short" value="<?php echo e($page->short); ?>">
                            </div>

                            <div class="form-group">
                                <label class="form-label">Isi Halaman</label>
                                <textarea class="form-control mb-3" name="isi" id="editor" rows="5" required><?php echo e($page->isi); ?></textarea>
                            </div>

                            <div class="form-group mt-3">
                                <label class="form-label">Link</label>
                                <input type="url" class="form-control mb-3" name="link" value="<?php echo e($page->link); ?>">
                            </div>

                            <button type="submit" class="btn btn-primary mt-3">Update</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.ckeditor.com/4.21.0/standard/ckeditor.js"></script>
    <script>
        CKEDITOR.replace('editor');
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('dashboard.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\2025-instidla\resources\views/admin/pages/edit.blade.php ENDPATH**/ ?>