<div id="mtrAutomatico" class="modal fade" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content bd-0">
            <div class="modal-header pd-y-20 pd-x-25">
                <h6 id="lblTitulo" class="tx-14 mg-b-0 tx-uppercase tx-inverse tx-bold"></h6>
            </div>
            <div class="modal-body">
                <div class="content">
                    <div class="container-fluid">
                        <div class="card-body">
                            <div class="tab-content">
                                <div class="card tab-pane active card-primary" id="form-mtrManual">
                                    <div class="card-header">
                                        <h5>Asignación Automática</h5>
                                    </div>
                                    <form method="post" id="formMtrAutomatico" enctype="multipart/form-data">
                                        <div class="card-body">
                                            <div class="form-layout form-layout-1">
                                                <div class="row mg-b-25">                                                    
                                                        <?php
                                                        echo "<input type='hidden' name='matricula' id='matricula' value=" . $_GET["m"] . " />";
                                                        require_once("../../models/Matricula.php");
                                                        $matricula = new Matricula();
                                                        $resultado = $matricula->MatriculaDetalle_por_ID($_GET["m"]);
                                                        foreach ($resultado as $row) {
                                                            $matriculadbk = $row["matriculadbk"];
                                                            $estudiante = $row["estudiante"];
                                                            $nombre = $row["nombre"];
                                                            $codcar = $row["codcar"];
                                                            $carrera = $row["carrera"];
                                                            $periodbk = $row["periodbk"];
                                                            $periodo = $row["periodo"];
                                                            $fecha = $row["fecha"];
                                                            $itinerario = $row["itinerario"];
                                                            $tipo = $row["tipo"];
                                                        }
                                                        echo "<input type='hidden' name='codcar' id='codcar' value=" . $codcar . " />";
                                                        echo "<input type='hidden' name='periodbk' id='periodbk' value=" . $periodbk . " />";
                                                        ?>  
                                                    <div class="col-lg-12">
                                                        <div class="form-group">                                                                
                                                            <label for="nivel" class="form-label">Nivel:</label>
                                                            <select class="form-control select2" name="nivel" id="nivel" data-placeholder="Seleccione" required>
                                                                <option label="Seleccione"></option>
                                                                <option value="1">1</option>
                                                                <option value="2">2</option>
                                                                <option value="3">3</option>
                                                                <option value="4">4</option>
                                                                <option value="5">5</option>
                                                            </select>
                                                            <div class="invalid-feedback" id="invalid-nivel">Seleccione el Nivel</div>
                                                            <div class="valid-feedback" id="valid-nivel">¡Campo validado!</div>
                                                        </div>
                                                    </div>                                                                                                                                                   
                                                    <div class='form-layout-footer'>
                                                        <button type='submit' name='action' value='add' class='btn btn-success tx-11 tx-uppercase pd-y-12 pd-x-25 tx-mont tx-medium'>Guardar</button>                
                                                        <button type="reset" class="btn btn-danger tx-11 tx-uppercase pd-y-12 pd-x-25 tx-mont tx-medium" aria-label="Close" aria-hidden="true" data-dismiss="modal"><i class="fa fa-close"></i>Salir</button>
                                                    </div>                                                        
                                                </div>                                                        
                                            </div>
                                        </div>
                                    </form>
                                </div>                                                                                      
                            </div>
                        </div>                               
                    </div>              
                </div>
            </div> 
        </div>
    </div>
</div>