edit_education_load.blade.php 5.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <div class="col-md-12 mb-4 mt-4 open_education_edit_info_div">
  2. <div style="width: 100%;">
  3. <div class="panel-body" style="padding:10px; background-color: #4b4c6824; border: 1px solid #e9e5e5; border-radius: 5px;">
  4. <form method="POST" action="{{route('ajax-post', ['name'=>'update_education_history'])}}" class="edit_form">
  5. <input type="hidden" name="_token" value="{{ csrf_token() }}" />
  6. <input type="hidden" name="edit_id" value="{{$edit_data->id}}">
  7. <div class="row">
  8. <div class="col-md-4">
  9. <div class="mb-1">
  10. <label class="form-label">Academic level <span class="text-danger">*</span></label>
  11. <div class="form-icon position-relative">
  12. <select name="academiclevel" id="academic level" class="form-control frm" required="">
  13. <option disabled="" selected="" value="">Choose one....</option>
  14. @foreach($academic_level as $row)
  15. <option value="{{$row->id}}" @if($edit_data->academic_level ==$row->id) selected @endif>{{$row->name}}</option>
  16. @endforeach
  17. </select>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="col-md-4">
  22. <div class="mb-1">
  23. <label class="form-label" for="subject">Subject <span class="text-danger">*</span></label>
  24. <div class="form-icon position-relative">
  25. <input type="text" for="subject" name="subject" value="{{$edit_data->subject}}" class="form-control ps-2" required="">
  26. </div>
  27. </div>
  28. </div>
  29. <div class="col-md-4">
  30. <div class="mb-1">
  31. <label class="form-label" for="">Institution<span class="text-danger">*</span></label>
  32. <div class="form-icon position-relative">
  33. <input type="text" for="institution" name="institution" value="{{$edit_data->institution}}" class="form-control ps-2" placeholder="" required="">
  34. </div>
  35. </div>
  36. </div>
  37. <div class="col-md-4">
  38. <div class="mb-1">
  39. <label class="form-label">Passing Year <span class="text-danger">*</span></label>
  40. <div class="form-icon position-relative">
  41. <select name="passingyear" id="passing year" class="form-control frm" required="">
  42. <option disabled="" selected="" value="">Year</option>
  43. @foreach($passingyear as $row)
  44. <option value="{{$row}}" @if($edit_data->passing_year==$row) selected @endif>{{$row}}</option>
  45. @endforeach
  46. </select>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="col-md-4">
  51. <div class="mb-1">
  52. <label class="form-label">Result <span class="text-danger">*</span></label>
  53. <div class="form-icon position-relative">
  54. <input type="text" class="form-control ps-2" name="result" value="{{$edit_data->result}}" placeholder="" required="">
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="col-md-12">
  60. <div class="text-end">
  61. <button type="button" class="btn cancel_button mr-1 btn-cancel close_form" style="background-color: #ffbd59 !important; border: 2px solid #ffbd59; color: white;border-radius: 18px; padding: 2px 6px;" >
  62. <i aria-hidden="true" class="fa fa-refresh"></i>
  63. </button>
  64. <button class="btn btn2">Update</button>
  65. </div>
  66. </div>
  67. </form>
  68. </div>
  69. </div>
  70. </div>
  71. <script>
  72. $(function(){
  73. $(function(){
  74. $('.edit_form').on('submit', function(event){
  75. event.preventDefault();
  76. var self = $(this);
  77. ajax_form(self, function(self){
  78. $('.edit_education_load').empty();
  79. fetch_sub_content(
  80. '#education_history_load',
  81. "{{ route('sub-content', ['name'=>'education_history_load']) }}"
  82. );
  83. });
  84. });
  85. });
  86. $('.cancel_button').on('click', function(){
  87. $('.edit_edu_data').addClass('d-none')
  88. });
  89. });
  90. </script>