<div id="mantenimiento" 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-asignatura">
                                    <div class="card-header">
                                        <h5>Biometrico</h5>
                                    </div>
                                    <form method="post" id="formBiometrico" enctype="multipart/form-data">
                                        <input type="hidden" name="biometricodbk" id="biometricodbk"/>
                                        <div class="card-body">
                                            <div class="form-layout form-layout-1">
                                                <div class="row mg-b-25">
                                                    <div class="col-lg-12">
                                                        <div class="form-group">                                                                
                                                            <label for="tipo" class="form-label">Estado:</label>
                                                            <select class="form-control select2" name="status" id="status" data-placeholder="Seleccione" required>
                                                                <option value="1" selected>Activo</option>
                                                                <option value="0">Inactivo</option>
                                                            </select>
                                                            <div class="invalid-feedback" id="invalid-tipo">Seleccione el estado</div>
                                                            <div class="valid-feedback" id="valid-tipo">¡Campo validado!</div>
                                                        </div>
                                                    </div>
                                                    <div class="col-lg-12">
                                                        <div class="form-group">                                                                
                                                            <label for="tipo" class="form-label">Persona:</label>
                                                            <select class="form-control select2" name="person" id="person" data-placeholder="Seleccione" required>
                                                            </select>
                                                            <div class="invalid-feedback" id="invalid-tipo">Seleccione la persona</div>
                                                            <div class="valid-feedback" id="valid-tipo">¡Campo validado!</div>
                                                        </div>

                                                        <div class="form-group">
                                                            <label for="jornada" class="form-label">Jornada:</label>
                                                            <select class="form-control select2" name="jornada" id="jornada" data-placeholder="Seleccione" required>
                                                            </select>
                                                            <div class="invalid-feedback" id="invalid-jornada">Seleccione la jornada</div>
                                                            <div class="valid-feedback" id="valid-jornada">¡Campo validado!</div>
                                                        </div>

                                                        <div id="user_current" class="d-none">
                                                            <p class="text-muted"><b>Usuario Actual</b>: <span id="person_update"></span></p>
                                                        </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>

<div id="mac_view" class="modal fade" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog modal-md" role="document">
        <div class="modal-content bd-0">
            <div class="modal-header pd-y-20 pd-x-25">
                <h5 class="tx-14 mg-b-0 tx-uppercase tx-inverse tx-bold modal-titl">
                    Consultar direccion MAC
                </h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="callout callout-danger">
                    Bienvenid@
                    <b><?php echo $_SESSION["pnombre"]." ".$_SESSION["papellido"]." ".$_SESSION["snombre"]." ".$_SESSION["sapellido"]; ?></b> 
                    su direccion mac es:
                    
                    <div class="input-group mt-3">
                        <input type="text" class="form-control" id="mac_direction" value="<?php 
                            echo Biometrico::GetAddress();
                        ?>" readonly>
                        <div class="input-group-append">
                            <button type="button" class="btn btn-primary" id="copy_mac" title="Copy mac">
                                <i class="fas fa-copy"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div> 

            <div class="modal-footer">
                <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">
                    <i class="fas fa-times mr-2"></i> Cerrar
                </button>
            </div>
        </div>
    </div>
</div>

<div id="registro_biometrico" class="modal fade" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog modal-md" role="document">
        <div class="modal-content bd-0">
            <div class="modal-header pd-y-20 pd-x-25">
                <h5 class="tx-14 mg-b-0 tx-uppercase tx-inverse tx-bold modal-titl">
                    Registro Biometrico
                </h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="callout callout-danger">
                    Bienvenid@
                    <b><?php echo $_SESSION["pnombre"]." ".$_SESSION["papellido"]." ".$_SESSION["snombre"]." ".$_SESSION["sapellido"]; ?></b>
                    por favor seleccion el tipo de registro, recuerda que no se pueden modificar los datos una vez registrado.
                </div>

                <div class="row mt-2">
                    <div class="col-md-12">
                        <span class="fw-bold"><b>Fecha Actual: </b></span>
                        <span id="MyDateDisplay"></span>
                    </div>
                    <div class="col-md-12">
                        <span class="fw-bold"><b>Hora Actual: </b></span>
                        <span id="MyClockDisplay"></span>
                    </div>
                </div>

                <form id="register_form">
                    <input type="hidden" name="personadbk" value="<?php echo $_SESSION["usuariodbk"]; ?>">
                    <div class="mt-4">
                        <div class="tab-pane fade active show" id="he" role="tabpanel">
                            <div class="mb-3 mt-3 border p-3">
                            <label class="form-label fw-bold">Formato de registro <span class="text-danger">(*)</span></label>
                            <select name="tipo" required class="form-control" id="register_format">
                                <option selected value="">Seleccionar horario</option>
                                <option value="ENTRADA_INICIAL" id="entryInitial">Entrada Inicial</option>
                                <option value="ENTRADA_ALMUERZO">Entrada de Almuerzo</option>
                                <option value="SALIDA_ALMUERZO">Salida de Almuerzo</option>
                                <option value="SALIDA_FINAL" id="finalExit">Salida Final</option>
                            </select>
                            </div>
                        </div>
                    </div>
                </form>
            </div>  

            <div class="modal-footer">
                <button type="button" class="btn btn-warning btn-sm" id="save_register">
                    <i class="fas fa-save mr-2"></i> Guardar
                </button>   
                </button>
                <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">
                    <i class="fas fa-times mr-2"></i> Cerrar
                </button>
            </div>
        </div>
    </div>
</div>
