
<?php $__env->startSection('content'); ?>
<div class="container">
    <div class="justify-content-center">
        <div class="">
            <div class="card">
                <div class="card-header">Edit Role</div>
                <div class="card-body">
                    <?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; ?>
                    <form method="post" action="<?php echo e(url('admin/roles/'.$detail->id)); ?>" onsubmit="return validateForm('addsstatus')" class="addsstatus" autocomplete="off" enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        <?php echo e(method_field('PATCH')); ?>

                        <div class="row">
                            <div class="col-md-3">
                                <div class="form-group">
                                    <label for="title"> Role Name <span class="require label-mandatory">*</span></label>

                                    <input type="text" class="form-control input-mandatory" id="banner" name="name" value="<?php echo e($detail->name); ?>" placeholder="Role Name">

                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="form-group">
                                    <label for="title"> All Permission <span class="require label-mandatory">*</span></label>

                                    <INPUT type="checkbox" onchange="checkAll(this)" name="chk[]" <?php echo e(count($rolePermissions) == count($permission) ? 'checked' : ''); ?> />

                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <?php $__currentLoopData = $permission; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="col-md-3">
                                <div class="form-group">
                                    <input type="checkbox" name="permission[]" value="<?php echo e($value->id); ?>" <?php echo e(in_array($value->id,$rolePermissions) ? 'checked' : ''); ?>>
                                    <span style="    margin-left: 10%;"><?php echo e($value->name); ?> </span>
                                </div>
                            </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                        <br>
                        <div class="form-group">

                            <button type="submit" class="btn btn-primary">Submit</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.main-layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/profcymadev/public_html/onebet.profcymadev.in/resources/views/admin/role/edit.blade.php ENDPATH**/ ?>