<div class="modal fade" id="admitStudentModal{{$student->id}}" tabindex="-1" role="dialog" aria-labelledby="admitStudentModalLabel{{$student->id}}" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="admitStudentModalLabel{{$student->id}}">Admit Student {{ $student->name }}</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <form action="{{ route('admitStudent') }}" method="POST">
                @csrf
                <div class="modal-body">
                    <input type="hidden" name="student_id" value="{{ $student->id }}">
                    <input type="hidden" name="course_id" value="{{ $student->course }}">

                    <div class="form-group row">
                        <label for="course_name" class="col-sm-4 col-form-label">Student Names:</label>
                        <div class="col-sm-8">
                            <p id="studentnames" class="form-control-static">{{ $student->name }}</p>
                        </div>
                    </div>
                    
                    

                    <div class="form-group row">
                        <label for="course_name" class="col-sm-4 col-form-label">Course:</label>
                        <div class="col-sm-8">
                            <p id="course_name" class="form-control-static">{{ $student->course_name }}</p>
                        </div>
                    </div>

                    <div class="form-group row">
                        <label for="admission_date" class="col-sm-4 col-form-label">Admission Date:</label>
                        <div class="col-sm-8">
                            <input type="date" name="admission_date" id="admission_date" class="form-control" max="{{ date('Y-m-d') }}" required>
                        </div>
                    </div>

                    
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                    <button type="submit" class="btn btn-primary">Admit</button>
                </div>
            </form>
        </div>
    </div>
</div>
