<div class="col-md-12 mb-4 mt-4">
    <div  style="width: 96%; margin-left: 21px;">
        <div class="panel-body" style="padding:10px; background-color: #16183f69;  border: 1px solid #e9e5e5; border-radius: 5px;">
            <form method="POST" action="{{route('ajax-post', ['name'=>'update_proposal'])}}" class="edit_form"> 
                <input type="hidden" name="_token" value="{{ csrf_token() }}" />
                <input type="hidden" name="edit_id" value="{{$proposal->id}}">
                <div class="col-md-12">
                    <div class="mb-1">
                        <label class="form-label">Title</label>
                        <div class="form-icon position-relative">
                            <input type="text" class="form-control" placeholder="Title" name="title" value="{{$proposal->title}}" required="">
                        </div>
                    </div>
                </div>  
                <div class="row">                                                                               
                    <div class="col-md-4 back">
                        <div class="mb-1">
                            <label class="form-label">Methology</label>
                            <select class="form-control"  name="methology">
                                <option value="Methology" @if($proposal->methology=="Methology") selected @endif>Methology</option>
                                <option value="Quantitative" @if($proposal->methology=="Quantitative") selected @endif>Quantitative </option>
                                <option value="Qualitative" @if($proposal->methology=="Qualitative") selected @endif>Qualitative </option>
                            </select>
                        </div>
                    </div> 
                    <div class="col-md-4">
                        <div class="mb-1">
                            <label class="form-label">Department</label>
                            <div class="form-icon position-relative">
                                <select class="form-control" name="department" required="">
                                    <option selected disabled>Select one</option>
                                    @foreach($departments as $row)
                                        <option value="{{$row->id}}" @if($row->id==$proposal->department) selected @endif>{{$row->name}}</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                    </div>                                                            
                    <div class="col-md-4 back">
                        <div class="mb-1">
                            <label class="form-label">Funding Status</label>
                            <select class="form-control" name="status">
                                <option value="Funding Status" @if($proposal->status=="Funding Status") selected @endif>Funding Status</option>
                                <option value="Self-Funded" @if($proposal->status=="Self-Funded") selected @endif>Self-Funded</option>
                                <option value="Govt. Scholarship" @if($proposal->status=="Govt. Scholarship") selected @endif>Govt. Scholarship</option>
                                <option value="Other Scholarship" @if($proposal->status=="Other Scholarship") selected @endif>Other Scholarship</option>
                            </select>
                        </div>
                    </div>
                </div>     
                <div class="col-md-12">
                    <div class="mb-3">
                        <label class="form-label" for="proposal">Proposal File</label>
                        <input type="file" accept="application/pdf,application/docx,application/doc" name="documentfile" id="documentfile" class="form-control">
                    </div>
                </div>
                <div class="col-md-12">
                    <div class="text-end">
                        <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;" >
                            <i aria-hidden="true" class="fa fa-refresh"></i>
                        </button>
                        <button class="btn btn2">Update</button>                      
                    </div>
                </div>
                
            </form>  
        </div>
    </div>
</div>
 

<script>
    $(function(){
        $('.edit_form').on('submit', function(event){
            event.preventDefault();
            var self = $(this); 
            ajax_form(self, function(self){
                 
            });
        });
         

        $('.btn-cancel').on('click', function(){ 
            $('.open_proposal_edit_info_div').addClass('d-none')
        });
    });
</script>