Edit File: edit.blade.php
@extends('admin.layout.master') @section('css') <style> .permissionCard{ border: 0; margin-bottom: 13px; } .text-white { color: #ffff !important; } .role-title{ background: #2d7679; 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; } </style> @endsection @section('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">{{awtTrans('اضافه صلاحية ')}}</h4> </div> <div class="card-content"> <div class="card-body"> <form action="{{route('admin.roles.update',$role->id)}}" method="post"> @method('put') @csrf <div class="container mt-2"> <div style="display: flex; flex-direction: row-reverse;"> <p style="margin-right: 10px;">{{awtTrans('تحديد الكل')}}</p> <input type="checkbox" id="checkedAll"> </div> </div> <div class="container mt-2"> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label>{{awtTrans('الاسم بالعربيه')}}</label> <input type="text" name="name_ar" class="form-control" value="{{$role->getTranslations('name')['ar']}}" placeholder="Enter ..." required> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label>{{awtTrans('الاسم بالانجليزيه')}}</label> <input type="text" name="name_en" class="form-control" value="{{$role->getTranslations('name')['en']}}" placeholder="Enter ..." required> </div> </div> </div> </div> <div class="container mt-2"> <div class="row"> {!! $html !!} </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">{{awtTrans('تعديل')}}</button> <a href="{{ url()->previous() }}" type="reset" class="btn btn-outline-warning mr-1 mb-1">{{awtTrans(' رجوع ')}}</a> </div> </form> </div> </div> </div> </div> </div> </section> @endsection @section('js') <script> $(function () { $('.roles-parent').change(function () { var childClass = '.' + $(this).attr('id'); if (this.checked) { $(childClass).prop("checked", true); } else { $(childClass).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> @endsection
Back to File Manager