<?php
helper('html');
?>
<?= $this->extend('plantilla/view_plantilla') ?>
<?= $this->section('js') ?>
    <?php
        echo script_tag('js/modulos/seguridad/sub_modulo.js');
    ?>
<?= $this->endSection() ?>

<?= $this->section('content') ?>

<div class="row">
    <div class="col-xl-12">
        <div class="card">
            <div class="card-body">

                <div class="row align-items-center">
                    <div class="col-md-6">
                        <div class="mb-3">
                           
                        </div>
                    </div>

                    <div class="col-md-6">
                        <div class="d-flex flex-wrap align-items-center justify-content-end gap-2 mb-3">
                            <div>
                                <a href="#" class="btn btn-success btnAgregar"><i class="bx bx-plus me-1"></i> Agregar Sub Módulo</a>
                            </div>
                        </div>

                    </div>
                </div>

                <div class="row">
                    <div class="col-lg-12">
                        <div class="">
                            <div class="table-responsive divTbl">

                                <table class="table table-nowrap align-middle table-hover">

                                </table>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>



<div class="modal fade" id="mdlDatos" tabindex="-1" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true" style="display: none;">
    <div class="modal-dialog modal-dialog-scrollable modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="mdlDatosTitle">Tupa</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <form action="<?= route_to('sub_modulo.guardar') ?>" method="post" class="frmDatos">
                
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control" id="sumo_descripcion" name="sumo_descripcion" placeholder="Descripción">
                        <label for="sumo_descripcion">Descripción</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control" id="sumo_enlace" name="sumo_enlace" placeholder="Enlace">
                        <label for="sumo_enlace">Enlace</label>
                    </div>
                    <div class="form-floating mb-3">
                        <input type="text" class="form-control" id="sumo_orden" name="sumo_orden" placeholder="Orden">
                        <label for="sumo_orden">Órden</label>
                    </div>
                    <div class="form-floating mb-3">
                        <select class="form-select" id="modu_id" name="modu_id" aria-label="Floating label select example">

                            <?php foreach ($lsModulos as $modulos): ?>
                                <option value="<?=$modulos->modu_id?>"><?=$modulos->modu_nombre?></option>
                            <?php endforeach ?>
                        </select>
                        <label for="modu_id">Módulos</label>
                    </div>
                    <input type="hidden" id="sumo_id" name="sumo_id">
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-light" data-bs-dismiss="modal"><i class="bx bx-x"></i> Cerrar</button>
                <button type="button" class="btn btn-success btnGuardar"><i class="bx bx-save"></i> Guardar</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>

<?= $this->endSection() ?>
