Changeset ea7b12a for resources/views/dashboard/departments/index.blade.php
- Timestamp:
- 10/19/21 17:46:21 (3 years ago)
- Branches:
- develop, master
- Children:
- 6b95845
- Parents:
- b9c4a92
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
resources/views/dashboard/departments/index.blade.php
rb9c4a92 rea7b12a 22 22 </nav> 23 23 <div class="dropdown"> 24 <a href=" {{ route("dashboard.departments.create") }}" class="btn btn-primary text-white">24 <a href="javascript:void(0)" data-toggle="modal" data-target="#createModal" class="btn btn-primary text-white"> 25 25 Add department 26 26 </a> … … 37 37 <tr> 38 38 <th> 39 {{-- <div class="custom-control custom-checkbox">--}}40 {{-- <input type="checkbox" class="custom-control-input" id="user-list-select-all">--}}41 {{-- <label class="custom-control-label" for="user-list-select-all"></label>--}}42 {{-- </div>--}}43 39 </th> 44 40 <th>ID</th> … … 75 71 </td> 76 72 <td> 77 <a href=" {{ route("dashboard.departments.edit", ["id" => $department->id]) }}" class="text-secondary" data-toggle="tooltip" title="Edit">73 <a href="javascript:void(0)" class="text-secondary" data-toggle="modal" data-target="#editModal_{{$department->id}}" title="Edit"> 78 74 <i class="ti-pencil"></i> 79 75 </a> … … 109 105 </div> 110 106 </div> 107 108 <div class="modal fade" id="editModal_{{$department->id}}" tabindex="-1" role="dialog" aria-hidden="true"> 109 <div class="modal-dialog modal-dialog-centered" role="document"> 110 <div class="modal-content"> 111 <div class="modal-header"> 112 <h5 class="modal-title" id="exampleModalCenterTitle">Edit department</h5> 113 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 114 <i class="ti-close"></i> 115 </button> 116 </div> 117 <div class="modal-body"> 118 <form action="{{ route("dashboard.departments.edit", ["id" =>$department->id]) }}" method="post" accept-charset="utf-8"> 119 @method("patch") 120 @csrf 121 <div class="row"> 122 <div class="col-md-6"> 123 <div class="form-group"> 124 <label class="form-label">Name</label> 125 <input type="text" name="name" value="{{ $department->name }}" minlength="2" maxlength="30" class="form-control" placeholder="Name" required> 126 </div> 127 </div> 128 <div class="col-md-6"> 129 <div class="form-group"> 130 <label class="form-label">Code</label> 131 <input type="text" name="code" value="{{ $department->code }}" minlength="2" maxlength="30" class="form-control" placeholder="Code" required> 132 </div> 133 </div> 134 </div> 135 <input type="submit" value="Save changes" class="btn btn-primary pull-right m-10"> 136 </form> 137 </div> 138 139 </div> 140 </div> 141 </div> 111 142 @endforeach 143 144 <div class="modal fade" id="createModal" tabindex="-1" role="dialog" aria-hidden="true"> 145 <div class="modal-dialog modal-dialog-centered" role="document"> 146 <div class="modal-content"> 147 <div class="modal-header"> 148 <h5 class="modal-title" id="exampleModalCenterTitle">Create department</h5> 149 <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 150 <i class="ti-close"></i> 151 </button> 152 </div> 153 <div class="modal-body"> 154 <form action="{{ route("dashboard.departments.store") }}" method="post" accept-charset="utf-8"> 155 @csrf 156 <div class="row"> 157 <div class="col-md-6"> 158 <div class="form-group"> 159 <label>Name</label> 160 <input type="text" name="name" value="{{ old('name') }}" minlength="2" maxlength="30" class="form-control" placeholder="Name" required> 161 </div> 162 </div> 163 <div class="col-md-6"> 164 <div class="form-group"> 165 <label>Code</label> 166 <input type="text" name="code" value="{{ old('code') }}" minlength="2" maxlength="30" class="form-control" placeholder="Code" required> 167 </div> 168 </div> 169 </div> 170 <input type="submit" value="Save changes" class="submitBtn btn btn-primary pull-right m-10"> 171 </form> 172 </div> 173 174 </div> 175 </div> 176 </div> 177 112 178 </tbody> 113 179 </table> … … 124 190 <!-- Datatable --> 125 191 <script src="{{ url('vendors/dataTable/dataTables.min.js') }}"></script> 126 127 <script>128 $('#deleteModal').on('show.bs.modal', function (event) {129 var button = $(event.relatedTarget)130 var dep_id = button.data('deptId')131 var modal = $(this)132 133 modal.find('.modal-body #dept_id').val(dep_id);134 });135 </script>136 192 @endsection
Note:
See TracChangeset
for help on using the changeset viewer.