edit_proposal.blade.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <div class="col-md-12 mb-4 mt-4">
  2. <div style="width: 96%; margin-left: 21px;">
  3. <div class="panel-body" style="padding:10px; background-color: #16183f69; border: 1px solid #e9e5e5; border-radius: 5px;">
  4. <form method="POST" action="{{route('ajax-post', ['name'=>'update_proposal'])}}" class="edit_form">
  5. <input type="hidden" name="_token" value="{{ csrf_token() }}" />
  6. <input type="hidden" name="edit_id" value="{{$proposal->id}}">
  7. <div class="col-md-12">
  8. <div class="mb-1">
  9. <label class="form-label">Title</label>
  10. <div class="form-icon position-relative">
  11. <input type="text" class="form-control" placeholder="Title" name="title" value="{{$proposal->title}}" required="">
  12. </div>
  13. </div>
  14. </div>
  15. <div class="row">
  16. <div class="col-md-4 back">
  17. <div class="mb-1">
  18. <label class="form-label">Methology</label>
  19. <select class="form-control" name="methology">
  20. <option value="Methology" @if($proposal->methology=="Methology") selected @endif>Methology</option>
  21. <option value="Quantitative" @if($proposal->methology=="Quantitative") selected @endif>Quantitative </option>
  22. <option value="Qualitative" @if($proposal->methology=="Qualitative") selected @endif>Qualitative </option>
  23. </select>
  24. </div>
  25. </div>
  26. <div class="col-md-4">
  27. <div class="mb-1">
  28. <label class="form-label">Department</label>
  29. <div class="form-icon position-relative">
  30. <select class="form-control" name="department" required="">
  31. <option selected disabled>Select one</option>
  32. @foreach($departments as $row)
  33. <option value="{{$row->id}}" @if($row->id==$proposal->department) selected @endif>{{$row->name}}</option>
  34. @endforeach
  35. </select>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="col-md-4 back">
  40. <div class="mb-1">
  41. <label class="form-label">Funding Status</label>
  42. <select class="form-control" name="status">
  43. <option value="Funding Status" @if($proposal->status=="Funding Status") selected @endif>Funding Status</option>
  44. <option value="Self-Funded" @if($proposal->status=="Self-Funded") selected @endif>Self-Funded</option>
  45. <option value="Govt. Scholarship" @if($proposal->status=="Govt. Scholarship") selected @endif>Govt. Scholarship</option>
  46. <option value="Other Scholarship" @if($proposal->status=="Other Scholarship") selected @endif>Other Scholarship</option>
  47. </select>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="col-md-12">
  52. <div class="mb-3">
  53. <label class="form-label" for="proposal">Proposal File</label>
  54. <input type="file" accept="application/pdf,application/docx,application/doc" name="documentfile" id="documentfile" class="form-control">
  55. </div>
  56. </div>
  57. <div class="col-md-12">
  58. <div class="text-end">
  59. <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;" >
  60. <i aria-hidden="true" class="fa fa-refresh"></i>
  61. </button>
  62. <button class="btn btn2">Update</button>
  63. </div>
  64. </div>
  65. </form>
  66. </div>
  67. </div>
  68. </div>
  69. <script>
  70. $(function(){
  71. $('.edit_form').on('submit', function(event){
  72. event.preventDefault();
  73. var self = $(this);
  74. ajax_form(self, function(self){
  75. });
  76. });
  77. $('.btn-cancel').on('click', function(){
  78. $('.open_proposal_edit_info_div').addClass('d-none')
  79. });
  80. });
  81. </script>