edit_university_load.blade.php 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <form method="POST" action="{{route('ajax-post', ['name'=>'edit_university_save'])}}" class="edit_university_info_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">Destination</label>
  10. <div class="form-icon position-relative">
  11. <select name="country_id" id="country_id" class="form-control" required="" style="font-size: 13px;">
  12. <option value="" selected disabled>Select</option>
  13. @foreach($market_countries as $row)
  14. <option value="{{$row->country_id}}" @if($row->country_id==$edit_data->country_id) selected @endif>{{ cn($row, 'country.name','')}}</option>
  15. @endforeach
  16. </select>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="col-md-4">
  21. <div class="mb-2">
  22. <label class="form-label config">University Name</label>
  23. <div class="form-icon position-relative">
  24. <input type="text" class="form-control" placeholder="University Name" id="university_name" name="university_name" value="{{$edit_data->name}}" required="" style="font-size: 13px;">
  25. </div>
  26. </div>
  27. </div>
  28. <div class="col-md-4">
  29. <div class="mb-2">
  30. <label class="form-label config">University Website</label>
  31. <div class="form-icon position-relative">
  32. <input type="text" class="form-control" placeholder="University Website" id="university_website" name="university_website" value="{{$edit_data->web_address}}" required="" style="font-size: 13px;">
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="row">
  38. <div class="col-md-12">
  39. <div class="text-end">
  40. <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;">
  41. <i aria-hidden="true" class="fa fa-refresh"></i>
  42. </button>
  43. <button class="btn btn2" id="submit_uni">Update</button>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </form>
  49. <script>
  50. $(function(){
  51. $('.edit_university_info_form').on('submit', function(event){
  52. event.preventDefault();
  53. var self = $(this);
  54. ajax_form(self, function(self){
  55. $('#country_wise_university').empty();
  56. fetch_sub_content(
  57. '#country_wise_university',
  58. "{{ route('sub-content', ['name'=>'country_wise_university']) }}"
  59. );
  60. });
  61. });
  62. });
  63. $('.btn-cancel').on('click', function(){
  64. $('.edit_data').addClass('d-none')
  65. });
  66. </script>