1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
-
- <form method="POST" action="{{route('ajax-post', ['name'=>'edit_department_save'])}}" class="edit_dep_info_form">
- <input type="hidden" name="_token" value="{{ csrf_token() }}" />
- <input type="hidden" name="edit_id" value="{{$edit_dept->id}}">
- <div class="col-md-12">
- <div class="mb-2">
- <label class="form-label config"></label>
- <div class="form-icon position-relative">
- <input type="text" class="form-control" placeholder="Department" name="department" value="{{$edit_dept->name}}" required="" style="font-size: 13px;">
- </div>
- </div>
- </div>
- <div class="col-md-12">
- <div class="text-end">
- <button type="button" class="btn cancel_button mr-1 btn-cancel close_form" >
- <i aria-hidden="true" class="fa fa-refresh"></i>
- </button>
- <button class="btn btn2">Update</button>
- </div>
- </div>
-
- </form>
-
- <script>
- $(function(){
- $('.edit_dep_info_form').on('submit', function(event){
- event.preventDefault();
- var self = $(this);
- ajax_form(self, function(self){
- $('#load_department').empty();
- fetch_sub_content(
- '#load_department',
- "{{ route('sub-content', ['name'=>'load_department']) }}"
- );
- });
- });
-
- $('.btn-cancel').on('click', function(){
- $('.open_department_edit_info_div_inner').addClass('d-none')
- });
- });
- </script>
|