<div class="modal fade" id="RegisterStudent1" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">
    <div class="modal-content">
        <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Certify Student -  {{ $admission->student_name }}</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
        </div>
            <div class="modal-body">
                <form class="row g-3" action="{{ route('registerCertifiedStudent') }}" method="post" autocomplete="off">
                    @csrf
                    <div class="col-md-6">
                        <label for="validationDefault01" class="form-label">Full names</label>
                        <input type="text" class="form-control" id="validationDefault01" name="full_names" value="{{ $admission->student_name }}" required>
                    </div>
                    <div class="col-md-6">
                        <label for="validationDefault02" class="form-label">ID Number</label>
                        <input type="text" class="form-control" id="validationDefault02" name="national_id" value="{{ $admission->idno }}" required>
                    </div>

                    <div class="col-md-6">
                        <label for="validationDefault02" class="form-label">Phone Number</label>
                        <input type="number" class="form-control" id="validationDefault02" name="phone" value="{{ $admission->phone }}" required>
                    </div>

                    <div class="col-md-6">
                        <label for="validationDefault02" class="form-label">Email address</label>
                        <input type="email" class="form-control" id="validationDefault02" name="email" value="{{ $admission->email }}" required>
                    </div>

                    <div class="col-md-6">
                        <label for="validationDefault02" class="form-label">Approval Date</label>
                        <input type="date" class="form-control" id="validationDefault02" name="approvaldate" placeholder="Enter student's approval date" max="{{ date('Y-m-d') }}" required>
                    </div>
                    

                    <div class="col-md-6">
                        <label for="validationDefault04" class="form-label">Course</label>
                        <select class="form-select" id="validationDefault04" name="course_id" required>
                            <option selected disabled value="">Choose...</option>
                            @foreach($courses as $course)
                                <option value="{{ $course->id }}">{{ $course->course_name }}</option>
                            @endforeach
                        </select>
                    </div>

                    <div class="col-md-6">
                        <label for="validationDefault04" class="form-label">Training Station</label>
                        <select class="form-select" id="validationDefault04" name="training_station" required>
                            <option selected disabled value="">Choose...</option>
                            @foreach($stations as $station)
                                <option value="{{ $station->station_name }}">{{ $station->station_name }}</option>
                            @endforeach
                        </select>
                    </div>

                    <div class="col-md-6">
                        <label for="validationDefault04" class="form-label">Trainer Name</label>
                        <select class="form-select" id="validationDefault04" name="trainerid" required>
                            <option selected disabled value="">Choose...</option>
                            @foreach($trainers as $trainer)
                                <option value="{{ $trainer->pin }}">{{ $trainer->name }}</option>
                            @endforeach
                        </select>
                    </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">Award Certificate</button>
                </form>
        </div>
    </div>
    </div>
</div>



<div class="modal fade" id="{{ $admission->id }}" tabindex="-1" role="dialog" aria-labelledby="label{{ $admission->id }}" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">

            <div class="modal-header">
                <h5 class="modal-title" id="label{{ $admission->id }}">Certify Student - {{ $admission->student_name }}</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>

            <form class="row g-3" action="{{ route('registerCertifiedStudent') }}" method="post" autocomplete="off">
                @csrf

                <div class="modal-body">
                    <div class="col-md-6">
                        <label class="form-label">Full names</label>
                        <input type="text" class="form-control" name="full_names" value="{{ $admission->student_name }}" required>
                    </div>

                    <div class="col-md-6">
                        <label class="form-label">ID Number</label>
                        <input type="text" class="form-control" name="national_id" value="{{ $admission->idno }}" required>
                    </div>

                    <div class="col-md-6">
                        <label class="form-label">Phone Number</label>
                        <input type="number" class="form-control" name="phone" value="{{ $admission->phone }}" required>
                    </div>

                    <div class="col-md-6">
                        <label class="form-label">Email address</label>
                        <input type="email" class="form-control" name="email" value="{{ $admission->email }}" required>
                    </div>

                    <div class="col-md-6">
                        <label class="form-label">Approval Date</label>
                        <input type="date" class="form-control" name="approvaldate" max="{{ date('Y-m-d') }}" required>
                    </div>

                    <div class="col-md-6">
                        <label class="form-label">Course</label>
                        <select class="form-select" name="course_id" required>
                            <option selected disabled value="">Choose...</option>
                            @foreach($courses as $course)
                                <option value="{{ $course->id }}">{{ $course->course_name }}</option>
                            @endforeach
                        </select>
                    </div>

                    <div class="col-md-6">
                        <label class="form-label">Training Station</label>
                        <select class="form-select" name="training_station" required>
                            <option selected disabled value="">Choose...</option>
                            @foreach($stations as $station)
                                <option value="{{ $station->station_name }}">{{ $station->station_name }}</option>
                            @endforeach
                        </select>
                    </div>

                    <div class="col-md-6">
                        <label class="form-label">Trainer Name</label>
                        <select class="form-select" name="trainerid" required>
                            <option selected disabled value="">Choose...</option>
                            @foreach($trainers as $trainer)
                                <option value="{{ $trainer->pin }}">{{ $trainer->name }}</option>
                            @endforeach
                        </select>
                    </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">Award Certificate</button>
                </div>
            </form>
        </div>
    </div>
</div>
