Edit File: 6a2cd1795a63d0ac44edc840479be54606baf73e.php
<?php $__env->startSection('css'); ?> <link rel="stylesheet" type="text/css" href="<?php echo e(asset('admin/app-assets/css-rtl/plugins/forms/validation/form-validation.css')); ?>"> <style> .permissionCard { border: 0; margin-bottom: 13px; } .role-title { background: #5d54d4; padding: 12px; border-radius: 7px; /* margin-bottom: 10px; */ } .list-unstyled { padding: 10px; height: 300px; /* scroll-behavior: smooth; */ overflow: auto; } .selectP { margin-right: 10px; margin-top: 11px; } .title_lable { color: #4762dd !important; } </style> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <section id="multiple-column-form"> <div class="row match-height"> <div class="col-12"> <div class="card"> <div class="card-header"> <h4 class="card-title"><?php echo e(__('admin.add')); ?></h4> </div> <div class="card-content"> <div class="card-body"> <form action="<?php echo e(route('admin.roles.store')); ?>" method="post" novalidate> <?php echo csrf_field(); ?> <div class="container mt-2"> <div style="display: flex; flex-direction: row-reverse; align-items: center"> <p class="selectP"><?php echo e(__('admin.select_all')); ?></p> <input type="checkbox" id="checkedAll"> </div> </div> <div class="row"> <?php $__currentLoopData = languages(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="col-md-6 col-12"> <div class="form-group"> <label for="first-name-column"><?php echo e(__('site.name_'.$lang)); ?></label> <div class="controls"> <input type="text" name="name[<?php echo e($lang); ?>]" class="form-control" placeholder="<?php echo e(__('site.write') . __('site.name_'.$lang)); ?>" required data-validation-required-message="<?php echo e(__('admin.this_field_is_required')); ?>"> </div> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <div class="container mt-2"> <div class="row"> <?php $__currentLoopData = $routes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $routeKey => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if(isset($value->getAction()['title']) && isset($value->getAction()['type']) && $value->getAction()['type'] == 'parent' && !isset($value->getAction()['is_home'])): ?> <div class="col-md-4"> <div class="card permissionCard package bg-white shadow"> <div class="role-title text-white" style="display: flex; justify-content: space-between;"> <div style="display: flex; flex-direction: row; align-items: center"> <div class="icheck-primary d-inline"> <input type="checkbox" name="permissions[]" value="<?php echo e($value->getName()); ?>" id="gtx_<?php echo e($routeKey); ?>" class="roles-parent"> <label for="gtx_<?php echo e($routeKey); ?>" dir="ltr"></label> </div> <p class="text-white selectP" for="gtx_<?php echo e($routeKey); ?>"><?php echo e(__('routes.'.$value->getAction()["title"])); ?></p> </div> <div style="display: flex; flex-direction: row-reverse; align-items: center"> <p class="text-white selectP"><?php echo e(__('admin.select_all')); ?></p> <input type="checkbox" class="checkChilds checkChilds_gtx_<?php echo e($routeKey); ?>" data-parent="gtx_<?php echo e($routeKey); ?>"> </div> </div> <ul class="list-unstyled"> <?php if(isset($value->getAction()['child']) && count($value->getAction()['child'])): ?> <?php $__currentLoopData = $value->getAction()['child']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $child): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="form-group clearfix"> <div class="icheck-primary d-inline"> <input type="checkbox" name="permissions[]" data-parent="gtx_<?php echo e($routeKey); ?>" value="admin.<?php echo e($child); ?>" id="<?php echo e($value->getName()); ?> <?php echo e($key); ?>" class="childs gtx_<?php echo e($routeKey); ?>"> <label for="<?php echo e($value->getName()); ?> <?php echo e($key); ?>" dir="ltr"></label> </div> <label class="title_lable" for=" <?php echo e($value->getName()); ?> <?php echo e($key); ?>"><?php echo e(__('routes.'.$routes_data['"admin.' . $child . '"']['title'])); ?></label> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php else: ?> <span class="text-danger position-absolute" style="top:50% ; left: 32%;"> <?php echo e(__('admin.no_sub_routes')); ?> </span> <?php endif; ?> </ul> </div> </div> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </div> <div class="col-12 d-flex justify-content-center mt-3"> <button type="submit" class="btn btn-primary mr-1 mb-1 submit_button"><?php echo e(__('admin.add')); ?></button> <a href="<?php echo e(url()->previous()); ?>" type="reset" class="btn btn-outline-warning mr-1 mb-1"><?php echo e(__('admin.back')); ?></a> </div> </form> </div> </div> </div> </div> </div> </section> <?php $__env->stopSection(); ?> <?php $__env->startSection('js'); ?> <script src="<?php echo e(asset('admin/app-assets/vendors/js/forms/validation/jqBootstrapValidation.js')); ?>"></script> <script src="<?php echo e(asset('admin/app-assets/js/scripts/forms/validation/form-validation.js')); ?>"></script> <script> $(function () { // $('.roles-parent').change(function () { // var childClass = '.' + $(this).attr('id'); // if (this.checked) { // $(childClass).prop("checked", true); // } else { // $(childClass).prop("checked", false); // } // }); $('.roles-parent').change(function (e) { var id = $(this).attr('id'); if (!this.checked) { var count = 0 $("."+id).each(function() { if (this.checked) { count = count + 1 } }); if (count > 0 ) { $('#'+id).prop('checked' , true) }else{ $('#'+id).prop('checked' , false) } } }); $('.checkChilds').change(function () { var childClass = $(this).data('parent'); if (this.checked) { $('.' +childClass).prop("checked", true); $('#' +childClass).prop("checked", true); } else { $('.' +childClass).prop("checked", false); $('#' +childClass).prop("checked", false); } }); $('.childs').change(function () { var parent = $(this).data('parent'); if (this.checked) { $('#' +parent).prop("checked", true); var count = 0 $("."+parent).each(function() { if (! this.checked) { count = count + 1 } }); if (count > 0 ) { $('.checkChilds_'+parent).prop('checked' , false) }else{ $('.checkChilds_'+parent).prop('checked' , true) } }else{ $('.checkChilds_'+parent).prop('checked' , false) } }); }); $("#checkedAll").change(function () { if (this.checked) { $("input[type=checkbox]").each(function () { this.checked = true }) } else { $("input[type=checkbox]").each(function () { this.checked = false; }) } }); </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('admin.layout.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/thunderw/public_html/resources/views/admin/roles/create.blade.php ENDPATH**/ ?>
Back to File Manager