OwlCyberSecurity - MANAGER
Edit File: add.blade.php
{{-- Note: User any library only in master/main.blade.php --}} {{-- DO NOT OVERRIDE UNNECESSARY LIBRARIES --}} {{-- Extending main layout --}} @extends('master.main') {{-- Content starts here --}} {{-- This section is already wrapped --}} @section('content') <style> .error_div { background-color: #ffc8c8; border-radius: 4px; padding: 0.4rem; padding-left: 1rem; color: #f11a1a; border: 1px solid #ff2a2a; } .success_div { background-color: #aedcaf; border-radius: 4px; padding: 0.4rem; padding-left: 1rem; color: #1f6d26; border: 1px solid #248526; } </style> <div class="row p-2"> <div class="col-12"> <h3>Add Role</h3> </div> </div> <div class="row p-2"> <div class="col-12"> <div class="card"> <div class="card-body"> <div class="row"> @if (!empty($errors->all())) <div class="col-12 error_div"> {{ $errors->first() }} </div> @endif @if (session()->has('message')) <div class="col-12 error_div"> {{ session()->get('message') }} </div> @endif @if (session()->has('success')) <div class="col-12 success_div"> {{ session()->get('success') }} </div> @endif </div> <form action="{{ route('post_roles_add.add_roles') }}" method="POST"> @csrf <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12"> <label for="name" class="form-label">Role Name</label> <input type="text" name="name" id="name" class="form-control" autofocus value="{{ old('name') ? old('name') : '' }}"> </div> </div> <div class="row pt-2"> <div class="col-lg-6 col-md-6 col-sm-12"> <label for="status" class="form-label">Status</label> <br> <label><input type="radio" name="status" {{ old('status') == 0 ? 'checked' : '' }} value="0" style="vertical-align: middle;"> Active </label> <label><input type="radio" name="status" {{ old('status') == 1 ? 'checked' : '' }} value="1" style="vertical-align: middle;"> Inactive</label> </div> </div> <div class="row pt-2"> <div class="col-lg-12 col-md-12 col-sm-12"> <h4>Set Permissions</h4> <table class="table table-hover"> <?php foreach ($role_permissions as $permission_group => $permissions) { echo '<tr>'; echo '<th colspan="5">' . $permission_group . '</th>'; foreach ($permissions as $perm) { echo '<td><label style="font-weight:400;"><input type="checkbox" name="permission_ids[]" value="' . $perm['id'] . '" /> ' . $perm['title'] . '</label></td>'; } echo '</tr>'; } ?> </table> </div> </div> <div class="row pt-4"> <div class="col-lg-6 col-md-6 col-sm-12"> <button type="submit" class="custom-blue-btn width-5-rem ">Create</button> <a href="{{ route('get_roles_index.view_roles') }}"><button type="button" class="custom-grey-btn width-5-rem">Cancel</button></a> </div> </div> </form> </div> </div> </div> </div> <script> setTimeout(() => { $('.error_div').fadeOut('slow'); $('.success_div').fadeOut('slow'); }, 3000); </script> @endsection {{-- Content ends here --}} {{-- Note: User any library only in master/main.blade.php --}} {{-- DO NOT OVERRIDE UNNECESSARY LIBRARIES --}}