<div class="col-md-12 mb-4 mt-4 open_education_edit_info_div">
    <div  style="width: 100%;">
        <div class="panel-body" style="padding:10px; background-color: #4b4c6824;  border: 1px solid #e9e5e5; border-radius: 5px;">
            <form method="POST" action="{{route('ajax-post', ['name'=>'update_english_languge_proficiency'])}}" class="edit_form"> 
                <input type="hidden" name="_token" value="{{ csrf_token() }}" />
                <input type="hidden" name="edit_id" value="{{$edit_data->id}}">
                <div class="row">
                    <div class="col-md-4">
                        <div class="mb-1">
                                <label class="form-label" for="test date">Test Date</label>
                            <div class="form-icon position-relative">
                                <input name="testdate" value="@if($edit_data->test_date) {{date('d M Y',strtotime($edit_data->test_date))}} @else @endif" type="text" class="form-control date" placeholder="Test Date" autocomplete="off">
                            </div>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="mb-1">
                                <label class="form-label" for="expiration date">Expiration Date</label>
                            <div class="form-icon position-relative">
                                <input name="expirationdate" value="@if($edit_data->expiration_date) {{date('d M Y',strtotime($edit_data->expiration_date))}} @else @endif" type="text" class="form-control date1" placeholder="Expiration Date" autocomplete="off">
                            </div>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="mb-1">
                                <label class="form-label" for="test name">Test Name</label>
                            <div class="form-icon position-relative">
                                <input type="text"  for="test name" name="testname" value="{{$edit_data->test_name}}" class="form-control ps-2" id="testname" placeholder="IELTS" required="">
                            </div>
                        </div>
                    </div>
                </div>
                 <div class="row">
                        <div class="col-md-2 mt-2">
                            <div class="mb-1">
                                    <label class="form-label">Overall Score</label>
                                <div class="form-icon position-relative">
                                    <input type="text"  for="overall score" name="overallscore" value="{{$edit_data->overall_score}}" class="form-control ps-2" placeholder="Enter Score" required="">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-2">
                            <div class="mb-1 mt-2">
                                    <label class="form-label">Listening</label>
                                <div class="form-icon position-relative">
                                    <input type="text"  for="listening" name="listening" value="{{$edit_data->listening}}" class="form-control ps-2" placeholder="Enter Score" required="">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-2">
                            <div class="mb-1 mt-2">
                                    <label class="form-label">Speaking</label>
                                <div class="form-icon position-relative">
                                    <input type="text"  for="speaking" name="speaking" value="{{$edit_data->speaking}}" class="form-control ps-2" placeholder="Enter Score" required="">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-2">
                            <div class="mb-1 mt-2">
                                    <label class="form-label">Writing</label>
                                <div class="form-icon position-relative">
                                    <input type="text"  for="writing" name="writing" value="{{$edit_data->writing}}" class="form-control ps-2" placeholder="Enter Score" required="">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-2">
                            <div class="mb-1 mt-2">
                                    <label class="form-label">Reading</label>
                                <div class="form-icon position-relative">
                                    <input type="text"  for="reading" name="reading" value="{{$edit_data->reading}}" class="form-control ps-2" placeholder="Enter Score" required="">
                                </div>
                            </div>
                        </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(){

        $(".date,.date1").flatpickr({
            dateFormat: "d M Y",
        });
        
        $('.edit_form').on('submit', function(event){
                event.preventDefault();
                var self = $(this); 
                ajax_form(self, function(self){
                    $('.edit_english_languge_proficiency_form').empty();
                    fetch_sub_content(
                        '#english_languge_proficiency_load',
                        "{{ route('sub-content', ['name'=>'english_languge_proficiency_load']) }}"
                    );  
                });
        });
   

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