

<?php $__env->startSection('title'); ?>
    Edit Policy
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="card card-custom " id="kt_card_4">
        <div class="card-header">
            <h3 class="card-title">
                Edit Policy
            </h3>
        </div>
        <form class="form" action="<?php echo e(route('policies.update', $policy->id)); ?>" method="POST" enctype="multipart/form-data">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PUT'); ?>
            <div class="card-body">
                <div class="form-group row">
                    <div class="col-lg-12">
                        <label>Policy Title: <span class="text-danger">*</span></label>
                        <input type="text" name="title" class="form-control mb-2" placeholder="Enter policy title here" value="<?php echo e(old('title', $policy->title)); ?>" required />
                        <?php $__errorArgs = ['title'];
$__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="form-group row">
                    <div class="col-lg-6">
                        <label>Policy Icon:</label>
                        <input type="text" name="icon" class="form-control mb-2" placeholder="Enter policy icon here" value="<?php echo e(old('icon', $policy->icon)); ?>" />
                        <small>Visit <a href="https://icons.getbootstrap.com/" target="_blank">Bootstrap Icon</a>, click on any icon and press copy</small>
                        <?php $__errorArgs = ['icon'];
$__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 class="col-lg-6">
                        <label>Policy Category: <span class="text-danger">*</span></label>
                        <select name="category_id" class="form-control mb-2">
                            <option value="">Select Category</option>
                            <?php $__currentLoopData = $policyCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $policyCategory): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($policyCategory->id); ?>" <?php echo e(old('category_id', $policy->category_id) == $policyCategory->id ? 'selected' : ''); ?>>
                                    <?php echo e($policyCategory->title); ?>

                                </option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                        <?php $__errorArgs = ['category_id'];
$__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="form-group row">
                    <div class="col-lg-12">
                        <label>Policy Description: <span class="text-danger">*</span></label>
                        <textarea name="description" class="form-control" placeholder="Enter policy description"><?php echo e(old('description', $policy->description)); ?></textarea>
                        <?php $__errorArgs = ['description'];
$__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>
            <div class="card-footer">
                <div class="row">
                    <div class="col-lg-12 text-center">
                        <button type="submit" class="btn btn-success mr-2">Update Policy</button>
                        <a href="<?php echo e(route('policies.index')); ?>" class="btn btn-secondary">Cancel</a>
                    </div>
                </div>
            </div>
        </form>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/khusbuoli/staging.khusbuoli.com/resources/views/admin/policy/edit.blade.php ENDPATH**/ ?>