edit_teacher_load.blade.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <form method="POST" action="{{route('ajax-post', ['name'=>'edit_register_teacher_save'])}}" class="edit_register_pending_teacher_form">
  2. <input type="hidden" name="_token" value="{{ csrf_token() }}" />
  3. <input type="hidden" name="edit_id" value="{{$edit_data->id}}">
  4. <input type="hidden" name="action" value="edit">
  5. <div class="panel-body" style="padding:10px; background-color: #4b4c6824; border: 1px solid #e9e5e5; border-radius: 5px;">
  6. <div class="row">
  7. <div class="col-md-4">
  8. <div class="mb-2">
  9. <label class="form-label config">First Name</label>
  10. <div class="form-icon position-relative">
  11. <input type="text" class="form-control" placeholder="First Name" id="first_name" name="first_name" value="{{$edit_data->first_name}}" required="" style="font-size: 13px;">
  12. </div>
  13. </div>
  14. </div>
  15. <div class="col-md-4">
  16. <div class="mb-2">
  17. <label class="form-label config">Last Name</label>
  18. <div class="form-icon position-relative">
  19. <input type="text" class="form-control" placeholder="Last Name" id="last_name" name="last_name" value="{{$edit_data->last_name}}" required="" style="font-size: 13px;">
  20. </div>
  21. </div>
  22. </div>
  23. <div class="col-md-4">
  24. <div class="mb-2">
  25. <label class="form-label config">Designation</label>
  26. <div class="form-icon position-relative">
  27. <input type="text" class="form-control" placeholder="Designation" id="designation" name="designation" value="{{$edit_data->designation}}" required="" style="font-size: 13px;">
  28. </div>
  29. </div>
  30. </div>
  31. <div class="col-md-4">
  32. <div class="mb-2">
  33. <label class="form-label config">University</label>
  34. <div class="form-icon position-relative">
  35. <select name="university" id="university" class="form-control" required="" style="font-size: 13px;">
  36. <option selected disabled>Select University</option>
  37. @foreach($universities as $row)
  38. <option value="{{$row->id}}" @if($row->id==$edit_data->university_name) selected @endif>{{$row->name}}</option>
  39. @endforeach
  40. </select>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="col-md-4">
  45. <div class="mb-2">
  46. <label class="form-label config">Department</label>
  47. <div class="form-icon position-relative">
  48. <select name="department" class="form-control department_id" required="" style="font-size: 13px;">
  49. <option selected disabled>Select Department</option>
  50. @foreach($departments as $row)
  51. <option value="{{$row->id}}" @if($row->id==$edit_data->department) selected @endif>{{$row->name}}</option>
  52. @endforeach
  53. <option value="">Others</option>
  54. </select>
  55. </div>
  56. </div>
  57. </div>
  58. {{-- <div class="col-md-4 others_department" style="display: none;">
  59. <div class="mb-2">
  60. <label class="form-label config" >Others Department</label>
  61. <div class="form-icon position-relative">
  62. <input type="text" class="form-control" placeholder="Others Department" id="others_department" name="others_department" value="{{$edit_data->others_department}}" style="font-size: 13px;">
  63. </div>
  64. </div>
  65. </div> --}}
  66. <div class="col-md-4">
  67. <div class="mb-2">
  68. <label class="form-label config">Website</label>
  69. <div class="form-icon position-relative">
  70. <input type="text" class="form-control" placeholder="www.xyz.com" id="uni_website" name="uni_website" value="{{$edit_data->uni_website}}" style="font-size: 13px;">
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <div class="row">
  76. <div class="col-md-12">
  77. <div class="text-end">
  78. <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;">
  79. <i aria-hidden="true" class="fa fa-refresh"></i>
  80. </button>
  81. <button class="btn btn2">Update</button>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </form>
  87. <script>
  88. $(function(){
  89. // $('.department_id').change(function() {
  90. // var value = $(this).attr('selected','selected').val();
  91. // if (value == "" ) {
  92. // $('.others_department').show();
  93. // } else {
  94. // $('.others_department').removeClass('display:none');
  95. // $('.others_department').hide();
  96. // }
  97. // });
  98. $('.edit_register_pending_teacher_form').on('submit', function(event){
  99. event.preventDefault();
  100. var self = $(this);
  101. ajax_form(self, function(self){
  102. fetch_sub_content(
  103. '#pending_teacher_load',
  104. "{{ route('sub-content', ['name'=>'register_pending_teacher_load']) }}"
  105. );
  106. });
  107. });
  108. });
  109. $('.btn-cancel').on('click', function(){
  110. $('.edit_data').addClass('d-none')
  111. });
  112. </script>