upload_document_required.blade.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <form method="POST" action="{{route('ajax-post', ['name'=>'document_required_upload_save'])}}" class="edit_dep_info_form" enctype="multipart/form-data">
  2. <input type="hidden" name="_token" value="{{ csrf_token() }}" />
  3. <input type="hidden" id="req_id" name="id" value="{{$requirements->id}}">
  4. <div class="col-md-12">
  5. <div class="mb-2">
  6. <label class="form-label config"></label>
  7. <div class="form-icon position-relative">
  8. <input type="file" id="document_file" class="form-control" name="document_file" style="font-size: 13px;">
  9. </div>
  10. </div>
  11. </div>
  12. <div class="col-md-12">
  13. <div class="text-end">
  14. <button type="button" class="btn cancel_button mr-1 btn-cancel close_form" >
  15. <i aria-hidden="true" class="fa fa-refresh"></i>
  16. </button>
  17. <button type="submit" class="btn btn2 submit_upload_document">Update</button>
  18. </div>
  19. </div>
  20. </form>
  21. <script>
  22. $(function(){
  23. $('.edit_dep_info_form').on('submit', function(event){
  24. event.preventDefault();
  25. var self = $(this);
  26. ajax_form(self, function(self){
  27. fetch_sub_content(
  28. '#doc_required_load',
  29. "{{ route('sub-content', ['name'=>'document_required_load', 'id'=>$proposal_details->id]) }}"
  30. );
  31. });
  32. });
  33. $('.btn-cancel').on('click', function(){
  34. $('.open_document_info_div_inner').addClass('d-none')
  35. });
  36. });
  37. </script>