edit_publication_load.blade.php 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <form method="POST" action="{{route('ajax-post', ['name'=>'update_publication'])}}" class="edit_publication_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-5">
  8. <div class="mb-1">
  9. <label class="form-label">Publication <span class="text-danger">*</span></label>
  10. <div class="form-icon position-relative">
  11. <input type="text" class="form-control ps-2" name="publication" value="{{$edit_data->publication}}" placeholder="" required="">
  12. </div>
  13. </div>
  14. </div>
  15. <div class="col-md-5">
  16. <div class="mb-1">
  17. <label class="form-label">Status<span class="text-danger">*</span></label>
  18. <div class="form-icon position-relative">
  19. <select name="status" id="status" class="form-control frm" required="">
  20. <option disabled="" selected="" value="">Choose one....</option>
  21. <option value="1" @if($edit_data->status==1) selected @endif>Published</option>
  22. <option value="2" @if($edit_data->status==2) selected @endif>Under Review</option>
  23. <option value="3" @if($edit_data->status==3) selected @endif>Draft stage</option>
  24. </select>
  25. </div>
  26. </div>
  27. </div>
  28. <div class="col-md-2">
  29. <div class="mt-4 pt-3">
  30. <div class="text-end">
  31. <button type="button" class="btn cancel_button mr-1" style="background-color: #ffbd59 !important; border: 2px solid #ffbd59; color: white;border-radius: 18px; padding: 2px 6px;">
  32. <i aria-hidden="true" class="fa fa-refresh icncl"></i>
  33. </button>
  34. <button class="btn btn2" id="publication_update">Update</button>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </form>
  41. <script>
  42. $(function(){
  43. $('.edit_publication_info_form').on('submit', function(event){
  44. event.preventDefault();
  45. var self = $(this);
  46. ajax_form(self, function(self){
  47. $('#edit_publication_load').empty();
  48. fetch_sub_content(
  49. '#publication_load',
  50. "{{ route('sub-content', ['name'=>'publication_list_load']) }}"
  51. );
  52. });
  53. });
  54. });
  55. $('.cancel_button').on('click', function(){
  56. $('.edit_data').addClass('d-none')
  57. });
  58. </script>