<?php

    //validamos si la session no ha sido declarada, para incicializarla

    if (session_status() === PHP_SESSION_NONE) {

      session_start();

    }

    if(empty($_SESSION['login_appquadrata'])){

        echo"<script language='javascript'>window.location='../../../login'</script>;";

        exit();

    }

/*inicializamos valores para la configuracion del template*/

$setting_template='../../../settings_template.txt';

$variables=[];

$_Color='';

$_Template='';

$_Theme_Template='';

$_Css='';

$_Js='';

if (file_exists($setting_template)) {

    $lines = file($setting_template, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);

    foreach ($lines as $line) {

        list($nombre_variable, $valor) = explode('=', $line);

        $variables[$nombre_variable] = $valor;

    }

    /*recogemos los valores de las variables*/

    if (isset($variables['Color'])) {

        $_Color = $variables['Color'];



        //echo "El color es: $_Color";

    }

    if (isset($variables['Template'])) {

        $_Template = $variables['Template'];

        //echo "El Template es: $_template";

    }

    if (isset($variables['Theme_Template'])) {

        $_Theme_Template = $variables['Theme_Template'];

        //echo "El Theme_Template es: $_Theme_Template";

    }

    if (isset($variables['css'])) {

        $_Css = $variables['css'];

        //echo "El css es: $_Css";

    }

    if (isset($variables['js'])) {

        $_Js = $variables['js'];

        //echo "El js es: $_Js";

    }



    if (isset($variables['Rows_Columns'])) {

        $_Rows_Columns = $variables['Rows_Columns'];

    }else{

        $_Rows_Columns=4;

    }

}

/*terminan valores de configuracion pára el template*/

?>

<!DOCTYPE html>

<html  style="background-color: rgb(241, 245, 249);" lang="es" class="<?php if($_Color!=''){ echo 'theme-user'; }else{ echo $_Theme_Template; }?>">

<meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>

<meta name='description' content='Información sobre contenido de tu pagina'>

<meta name='keywords' content='aqui van los tags para ser encontrados por los boots de google ejemplo fibora,ti hyper solutions'>



<head>

<?php

    //Declaramos la variable time, para que al modificar un archivo, este no se guarde en cache y se vizualicen los cambios

    $time_log_assets=time();

    include('../../path.php');

    //require('../modelo/modulo_app.php');

    require(ROOT_CONTROLLER.'modulo_app.php');

    $Obj_modulo_app = new modulo_app();   

?>

    

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

    <!-- Incluir Select2 desde CDN -->

    <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.8/css/select2.min.css" rel="stylesheet" />

    <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.8/js/select2.min.js" defer></script>

    

    <meta name="viewport" content="width=device-width,initial-scale=1">

    <!--<link href='https://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css' rel='stylesheet'>-->

    <link rel="stylesheet" href="../../../dist/css/<?=$_Css;?>?time=<?=$time_log_assets;?>" />

    <link rel="stylesheet" href="../../../dist/css/app_style.css?time=<?=$time_log_assets;?>" />

    <!-- END: CSS Assets-->

    <script src="../../../dist/js/noback.js?time=<?=$time_log_assets;?>" type="text/javascript"></script>

    <!--Comienza plugins JTABLE---><!--Comienza plugins JTABLE--->

    <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>

    <style>

        select{

            font-family: fontAwesome

        }

    </style>



<?php



$action=!empty($_REQUEST['action'])?$_REQUEST['action']:'';

$pagina=!empty($_REQUEST['pagina'])?$_REQUEST['pagina']:'';

$_ScrollTo=!empty($_REQUEST['_ScrollTo'])?$_REQUEST['_ScrollTo']:'';

$Id_Modulo_App=!empty($_REQUEST['Id_Modulo_App'])?$_REQUEST['Id_Modulo_App']:'';

$Titulo_Modulo='';

$Descripcion_Modulo='';

$Tipo_Menu='';

$Href_Modulo='';

$Tipo_Enlace='';

$Icon_Fa_Modulo='';

$Status_Modulo='';

$Fecha_Registro='';

$Fecha_Modifico='';



switch ($action) {

    case 'editar':



        echo"<TITLE>Editar modulo_app</TITLE>";

        break;



    default:

        echo"<TITLE>Registrar modulo_app</TITLE>";

        break;

}

require_once(ROOT_CHARACTER_FIX);

$Obj_fix_characters = new fix_characters();



//lee las variables del formulario.

if (!empty($_POST))

{

    //require_once($context_modulo_app.'odbconexion/config.php');

    require_once(ROOT_CONFIG);      

    $Odbj_conexion = new odbconexion;

    $conexion=$Odbj_conexion->openconection();

    $consulta="SELECT * FROM modulo_app_appquadrata WHERE Id_Modulo_App='$Id_Modulo_App' ORDER BY Id_Modulo_App DESC";

    $Array_adapter_modulo_app=$conexion->query($consulta);

    $conexion->close();

    while($field_modulo_app=$Array_adapter_modulo_app->fetch_assoc())

    {

    $Titulo_Modulo=$field_modulo_app['Titulo_Modulo'];

   $Descripcion_Modulo=$field_modulo_app['Descripcion_Modulo'];

   $Tipo_Menu=$field_modulo_app['Tipo_Menu'];

   $Href_Modulo=$field_modulo_app['Href_Modulo'];

   $Tipo_Enlace=$field_modulo_app['Tipo_Enlace'];

   $Icon_Fa_Modulo=$field_modulo_app['Icon_Fa_Modulo'];

   $Status_Modulo=$field_modulo_app['Status_Modulo'];

   $Fecha_Registro=$field_modulo_app['Fecha_Registro'];

   $Fecha_Modifico=$field_modulo_app['Fecha_Modifico'];

   

    }

}?>    





<?php  



    $row_registers=0;

    $arreglo_registers = array();

    $Odbj_conexion = new odbconexion;

    $conexion=$Odbj_conexion->openconection();

    $consulta="SELECT * FROM modulo_app_appquadrata WHERE (Id_Modulo_App!=1 and Id_Modulo_App!=2) ORDER BY Id_Modulo_App ASC";

    $Array_adapter_modulo_registers=$conexion->query($consulta);

    $conexion->close();

    $rows_registers=$Array_adapter_modulo_registers->num_rows;

    while($field_modulo_register=$Array_adapter_modulo_registers->fetch_assoc())

    {

        $row_registers++;

        array_push($arreglo_registers, array("id" => $field_modulo_register['Id_Modulo_App'], "numero" => $row_registers));

   

    }

?> 

<script language='JavaScript'> 

var statSend = false;

function checkSubmit() {

    if (!statSend) {

        statSend = true;

        return true;

    } else {

        alert('La Informaci\u00F3n ya se est\u00E1 enviando, por favor espere...');

        return false;

    }

}

</script> 

<style>

       ::-webkit-scrollbar {

        display: none;

    }



    .btn-navigation-registers{



      background: none;

      border: 0;

      color: inherit;

      /* cursor: default; */

      font: inherit;

      line-height: normal;

      overflow: visible;

      padding: 0;

        -webkit-user-select: none; /* for button */

        -webkit-appearance: button; /* for input */

        -moz-user-select: none;

        -ms-user-select: none;

    }

</style>

<style type="text/css">

    #Icon_Fa_Modulo{



    width: 100%;

    border-radius: 0.375rem !important;

    --tw-border-opacity: 1 !important;

    border-color: rgb(var(--color-slate-200) / var(--tw-border-opacity)) !important;

    font-size: 0.875rem !important;

    line-height: 1.25rem !important;

    --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;

    --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color) !important;

    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);

    transition-property: color, background-color, border-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-text-decoration-color, -webkit-backdrop-filter;

    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;

    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-text-decoration-color, -webkit-backdrop-filter;

    transition-duration: 200ms;

    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);

    }



    .select2-container--default .select2-selection--single .select2-selection__rendered {

        text-align: left;

        color: #444;

        line-height: 28px;

    }

</style>

</head>

<center>

<body onload="validarTipoModulo();noback();">





  <?php

    //Comienza form del formulario

echo "<div class='intro-y box form-box'>";

    

    switch ($action) {

    case 'editar':

        echo "

            <div class='flex items-center p-5 border-b border-slate-200/60 dark:border-darkmode-400'>

                <h2 class='font-medium text-base mr-auto'>

                    EDITAR MODULO APP

                </h2>";

            foreach ($arreglo_registers as $elemento) {

                    if ($elemento["id"] === $Id_Modulo_App) {

                        $numeroEncontrado = $elemento["numero"];

                        break; // Detén el bucle una vez que se encuentre el elemento

                    }

                }

                echo "<p class='mr-3'>".$numeroEncontrado."/".$rows_registers."</p>";



                if($numeroEncontrado>1){

                    $registerPrev=$numeroEncontrado-1;

                    

                    foreach ($arreglo_registers as $elemento) {

                        if ($elemento["numero"] === $registerPrev) {

                            $idEncontradoPrev = $elemento["id"];

                            break; // Detén el bucle una vez que se encuentre el elemento

                        }

                    }

                    echo "<form action='./formulario.php' method='Post' onsubmit='loadingpage();'>

                        <input type='hidden' value='$idEncontradoPrev' name='Id_Modulo_App'>

                        <input name='action' value='editar' type='hidden'>

                        <button type='submit' class='btn-navigation-registers'><svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-chevron-left'><path d='m15 18-6-6 6-6'/></svg></button>

                    </form>";

                }



                if($numeroEncontrado<$row_registers){

                    $registerNext=$numeroEncontrado+1;

                    

                    foreach ($arreglo_registers as $elemento) {

                        if ($elemento["numero"] === $registerNext) {

                            $idEncontradoNext = $elemento["id"];

                            break; // Detén el bucle una vez que se encuentre el elemento

                        }

                    }

                    echo "<form action='./formulario.php' method='Post' onsubmit='loadingpage();'>

                        <input type='hidden' value='$idEncontradoNext' name='Id_Modulo_App'>

                        <input name='action' value='editar' type='hidden'>

                        <button type='submit' class='btn-navigation-registers'><svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-chevron-right'><path d='m9 18 6-6-6-6'/></svg></button>

                    </form>";

                }

        echo "</div>";

        break;

    

    default:

        echo"

            <div class='flex items-center p-5 border-b border-slate-200/60 dark:border-darkmode-400'>

                <h2 class='font-medium text-base mr-auto'>

                    REGISTRAR MODULO APP

                </h2>

            </div>";

        break;

    }



    switch($_Rows_Columns){

        case 1:

        $cols_columns=12;

        break;

        case 2:

        $cols_columns=6;

        break;

        case 3:

        $cols_columns=4;

        break;

        case 4:

        $cols_columns=3;

        break;

        default:

        $cols_columns=12;

        break;



    }



    echo "<div class='p-5'>

            



            <form name='registrar'onsubmit='loadingpage();return checkSubmit();' action='../bussines/guardar.php' method='Post'>      

            <div class='grid grid-cols-12 gap-x-5'>

                <div class='col-span-12 xl:col-span-12'>";

                    echo "<input type='hidden' name='Id_Modulo_App' value='$Id_Modulo_App'>";

                    echo "<input type='hidden' name='pagina' value='$pagina'>";

                    echo "<input type='hidden' name='_ScrollTo' value='$_ScrollTo'>";



                    echo "<div class='grid grid-cols-12 gap-x-5'>";

                      echo " 

                                <div class='mt-3 col-span-12 lg:col-span-$cols_columns xl:col-span-$cols_columns'>

                                    <label for='update-profile-form-7' class='form-label'>Titulo Modulo: </label>

                                    <input id='Titulo_Modulo' name='Titulo_Modulo' value='$Titulo_Modulo' type='text' class='form-control'>

                                </div>";

                                 echo " 

                                <div class='mt-3 col-span-12 lg:col-span-$cols_columns xl:col-span-$cols_columns'>

                                    <label for='update-profile-form-7' class='form-label'>Descripcion Modulo: </label>

                                    <input id='Descripcion_Modulo' name='Descripcion_Modulo' value='$Descripcion_Modulo' type='text' class='form-control'>

                                </div>";

                                echo " 

                                <div class='mt-3 col-span-12 lg:col-span-$cols_columns xl:col-span-$cols_columns'>

                                    <label for='update-profile-form-7' class='form-label'>Tipo de módulo: </label>

                                    <select id='Tipo_Enlace' name='Tipo_Enlace' class='form-control' onchange='validarTipoModulo();'>

                                        <option value='modulo'>Módulo interno</option>

                                        <option value='enlace'>Enlace externo</option>

                                    </select>

                                </div>";

                                 echo " 

                                <div class='mt-3 col-span-12 lg:col-span-$cols_columns xl:col-span-$cols_columns' id='div_tipo_menu'>

                                    <label for='update-profile-form-7' class='form-label'>Tipo Menu: </label>

                                    <!--<input id='Tipo_Menu' name='Tipo_Menu' value='$Tipo_Menu' type='text' class='form-control'>-->

                                    <select id='Tipo_Menu' name='Tipo_Menu' class='form-control'>

                                        <option value='Menu'>Menu</option>

                                        <option value='Menu desplegable'>Menu desplegable</option>

                                        <option value='Sub menu'>Sub menu</option>

                                    </select>

                                </div>";

                                 echo " 

                                <div class='mt-3 col-span-12 lg:col-span-$cols_columns xl:col-span-$cols_columns'>

                                    <label for='update-profile-form-7' class='form-label'>Href Modulo: </label>

                                    <input id='Href_Modulo' name='Href_Modulo' value='$Href_Modulo' type='text' class='form-control'>

                                </div>";

                                echo " 

                                <div class='mt-3 col-span-12 lg:col-span-$cols_columns xl:col-span-$cols_columns'>

                                    <label for='update-profile-form-7' class='form-label'>Icon Fa Modulo: </label>

                                    <select id='Icon_Fa_Modulo' name='Icon_Fa_Modulo' class='form-control icons'>

                                    </select>

                                </div>";

                                 /*echo " 

                                <div class='mt-3'>

                                    <label for='update-profile-form-7' class='form-label'>Icon Fa Modulo: </label>

                                    <!--<input id='Icon_Fa_Modulo' name='Icon_Fa_Modulo' value='$Icon_Fa_Modulo' type='text' class='form-control'>-->

                                    <select class='form-control' id='Icon_Fa_Modulo' name='Icon_Fa_Modulo'>

                                     <option value='activity'> <a><i data-lucide='trash' class='w-4 h-4 mr-2'></i> activity</a></option>

                                </select>

                                </div>";*/

                    echo "</div>";

                                                   

echo "              

                </div>

            </div>";

         switch ($action) {

            case 'editar':



          echo "<div class='flex justify-end mt-4'>

                    <input type='hidden' name='action' value='editar'>

                    <a href='./?pagina=$pagina&_Id_Registro=$Id_Modulo_App&_ScrollTo=$_ScrollTo' class='btn btn-danger w-20 mr-auto'> Cancelar</a>

                    <button type='submit' class='btn btn-primary flex items-center'>Guardar</button>

                </div>";

            break;

            case 'duplicar':



          echo "<div class='flex justify-end mt-4'>

                    <input type='hidden' name='action' value='editar'>

                    <a href='./?pagina=$pagina&_Id_Registro=$Id_Modulo_App&_ScrollTo=$_ScrollTo' class='btn btn-danger w-20 mr-auto'> Cancelar</a>

                    <button type='submit' class='btn btn-primary flex items-center'>Guardar</button>

                </div>";

            break;

            

            default:

        echo   "<div class='flex justify-end mt-4'>

                    <input type='hidden' name='action' value='registrar'>

                    <a href='./?pagina=$pagina&_Id_Registro=$Id_Modulo_App&_ScrollTo=$_ScrollTo' class='btn btn-danger w-20 mr-auto'> Cancelar</a>

                    <button type='submit' class='btn btn-primary flex items-center'>Guardar</button>

                </div>";

            break;

        }                

            

echo "  </form>

        </div>

    </div>";





    //Termina form del formulario

?>

    

<script type="text/javascript">

  function validarTipoModulo(){

    var this_select=$("#Tipo_Enlace").val();

    if(this_select=='modulo'){

        $("#div_tipo_menu").css("display","block");

        $("#Href_Modulo").prop("type", "text");

    }else if(this_select=='enlace'){

        $("#div_tipo_menu").css("display","none");

        $("#Href_Modulo").prop("type", "url");

    }   

  }

</script>

<script>

$(document).ready(function() {

  $('#Icon_Fa_Modulo').select2({

    templateResult: formatOption,

    placeholder: 'seleccione icono',

    language: "es"

  });

});



function formatOption(option) {

  if (!option.id) {

    return option.text;

  }



  var option = $(

    '<span><img src="' + $(option.element).data('img-src') + '" class="img-flag" /> ' + option.text + '</span>'

  );



  return option;

}

</script>



<script>

document.addEventListener('DOMContentLoaded', function() {

  var select = document.getElementById('Icon_Fa_Modulo');

  

  var opciones = [

   

    { value: 'activity', text: 'activity', imgSrc: '../../../dist/svg/2.svg' },

    { value: 'airplay', text: 'airplay', imgSrc: '../../../dist/svg/airply.svg' },

    { value: 'alert-circle', text: 'alert-circle', imgSrc: '../../../dist/svg/aler-circle.svg' },

    { value: 'alert-triangle', text: 'alert-triangle', imgSrc: '../../../dist/svg/alert-triangle.svg' },

    { value: 'align-center', text: 'align-center', imgSrc: '../../../dist/svg/align-center.svg' },

    { value: 'align-justify', text: 'align-justify', imgSrc: '../../../dist/svg/aling-justify.svg' },

    { value: 'anchor', text: 'anchor', imgSrc: '../../../dist/svg/anchor.svg' },

    { value: 'aperture', text: 'aperture', imgSrc: '../../../dist/svg/aperture.svg' },

    { value: 'archive', text: 'archive', imgSrc: '../../../dist/svg/archive.svg' },

    { value: 'at-sign', text: 'at-sign', imgSrc: '../../../dist/svg/at-sign.svg' },

    { value: 'award', text: 'award', imgSrc: '../../../dist/svg/award.svg' },

    { value: 'bar-chart', text: 'bar-chart', imgSrc: '../../../dist/svg/bar-chart.svg' },

    { value: 'bar-chart2', text: 'bar-chart2', imgSrc: '../../../dist/svg/bar-chart2.svg' },

    { value: 'battery', text: 'battery', imgSrc: '../../../dist/svg/battery.svg' },

    { value: 'battery-charging', text: 'battery-charging', imgSrc: '../../../dist/svg/battery-charging.svg' },

    { value: 'bell', text: 'bell', imgSrc: '../../../dist/svg/bell.svg' },

    { value: 'bell-off', text: 'bell-off', imgSrc: '../../../dist/svg/bell-off.svg' },

    { value: 'bluetooh', text: 'bluetooh', imgSrc: '../../../dist/svg/bluetooh.svg' },

    { value: 'book', text: 'book', imgSrc: 'book.svg' },

    { value: 'book-mark', text: 'book-mark', imgSrc: '../../../dist/svg/book-mark.svg' },

    { value: 'book-open', text: 'book-open', imgSrc: '../../../dist/svg/book-open.svg' },

    { value: 'box', text: 'box', imgSrc: 'box.svg' },

    { value: 'brief-case', text: 'brief-case', imgSrc: '../../../dist/svg/brief-case.svg' },

    { value: 'calendar', text: 'calendar', imgSrc: '../../../dist/svg/caldendar.svg' },

    { value: 'camera', text: 'camera', imgSrc: '../../../dist/svg/camera.svg' },

    { value: 'cast', text: 'cast', imgSrc: '../../../dist/svg/cast.svg' },

    { value: 'circle', text: 'circle', imgSrc: '../../../dist/svg/circle.svg' },

    { value: 'clipboard', text: 'clipboard', imgSrc: '../../../dist/svg/clipboard.svg' },

    { value: 'clock', text: 'clock', imgSrc: '../../../dist/svg/clock.svg' },

    { value: 'cloud', text: 'cloud', imgSrc: '../../../dist/svg/cloud.svg' },

    { value: 'cloud-drizzle', text: 'cloud-drizzle', imgSrc: '../../../dist/svg/cloud-drizzle.svg' },

    { value: 'cloud-lightning', text: 'cloud-lightning', imgSrc: '../../../dist/svg/cloud-lightning.svg' },

    { value: 'cloud-rain', text: 'cloud-rain', imgSrc: '../../../dist/svg/cloud-rain.svg' },

    { value: 'cloud-snow', text: 'cloud-snow', imgSrc: '../../../dist/svg/cloud-snow.svg' },

    { value: 'code', text: 'code', imgSrc: '../../../dist/svg/code.svg' },

    { value: 'codepen', text: 'codepen', imgSrc: '../../../dist/svg/codepen.svg' },

    { value: 'coffee', text: 'coffee', imgSrc: '../../../dist/svg/coffee.svg' },

    { value: 'columns', text: 'columns', imgSrc: '../../../dist/svg/columns.svg' },

    { value: 'command', text: 'command', imgSrc: '../../../dist/svg/command.svg' },

    { value: 'compass', text: 'compass', imgSrc: '../../../dist/svg/compass.svg' },

    { value: 'copy', text: 'copy', imgSrc: '../../../dist/svg/copy.svg' },

    { value: 'corner-down-left', text: 'corner-down-left', imgSrc: '../../../dist/svg/corner-down-left.svg' },

    { value: 'octagon-alert', text: 'octagon-alert', imgSrc: '../../../dist/svg/octagon-alert.svg' },

    { value: 'corner-down-right', text: 'corner-down-right', imgSrc: '../../../dist/svg/corner-down-right.svg' },

        { value: 'corner-left-down', text: 'corner-left-down', imgSrc: '../../../dist/svg/corner-left-down.svg' },

        { value: 'corner-left-up', text: 'corner-left-up', imgSrc: '../../../dist/svg/corner-left-up.svg' },

        { value: 'corner-right-down', text: 'corner-right-down', imgSrc: '../../../dist/svg/corner-right-down.svg' },

        { value: 'corner-right-up', text: 'corner-right-up', imgSrc: '../../../dist/svg/corner-right-up.svg' },

        { value: 'corner-up-left', text: 'corner-up-left', imgSrc: '../../../dist/svg/corner-up-left.svg' },

        { value: 'corner-up-right', text: 'corner-up-right', imgSrc: '../../../dist/svg/corner-up-right.svg' },

        { value: 'cpu', text: 'cpu', imgSrc: '../../../dist/svg/cpu.svg' },

        { value: 'credit-card', text: 'credit-card', imgSrc: '../../../dist/svg/credit-card.svg' },

        { value: 'crop', text: 'crop', imgSrc: '../../../dist/svg/crop.svg' },

        { value: 'crosshair', text: 'crosshair', imgSrc: '../../../dist/svg/crosshair.svg' },

        { value: 'database', text: 'database', imgSrc: '../../../dist/svg/database.svg' },

        { value: 'delete', text: 'delete', imgSrc: '../../../dist/svg/delete.svg' },

        { value: 'disc', text: 'disc', imgSrc: '../../../dist/svg/disc.svg' },

        { value: 'dollar-sign', text: 'dollar-sign', imgSrc: '../../../dist/svg/dollar-sign.svg' },

        { value: 'droplet', text: 'droplet', imgSrc: '../../../dist/svg/droplet.svg' },

        { value: 'edit-2', text: 'edit-2', imgSrc: '../../../dist/svg/edit-2.svg' },

        { value: 'edit-3', text: 'edit-3', imgSrc: '../../../dist/svg/edit-3.svg' },

        { value: 'external-link', text: 'external-link', imgSrc: '../../../dist/svg/external-link.svg' },

        { value: 'eye-off', text: 'eye-off', imgSrc: '../../../dist/svg/eye-off.svg' },

        { value: 'eye', text: 'eye', imgSrc: '../../../dist/svg/eye.svg' },

        { value: 'facebook', text: 'facebook', imgSrc: '../../../dist/svg/facebook.svg' },

        { value: 'fast-forward', text: 'fast-forward', imgSrc: '../../../dist/svg/fast-forward.svg' },

        { value: 'file-minus', text: 'file-minus', imgSrc: '../../../dist/svg/file-minus.svg' },

        { value: 'file-plus', text: 'file-plus', imgSrc: '../../../dist/svg/file-plus.svg' },

        { value: 'file-text', text: 'file-text', imgSrc: '../../../dist/svg/file-text.svg' },

        { value: 'film', text: 'film', imgSrc: '../../../dist/svg/film.svg' },

        { value: 'filter', text: 'filter', imgSrc: '../../../dist/svg/filter.svg' },

        { value: 'flag', text: 'flag', imgSrc: '../../../dist/svg/flag.svg' },

        { value: 'folder-minus', text: 'folder-minus', imgSrc: '../../../dist/svg/folder-minus.svg' },

        { value: 'folder-plus', text: 'folder-plus', imgSrc: '../../../dist/svg/folder-plus.svg' },

        { value: 'folder', text: 'folder', imgSrc: '../../../dist/svg/folder.svg' },

        { value: 'framer', text: 'framer', imgSrc: '../../../dist/svg/framer.svg' },

        { value: 'frown', text: 'frown', imgSrc: '../../../dist/svg/frown.svg' },

        { value: 'gift', text: 'gift', imgSrc: '../../../dist/svg/gift.svg' },

        { value: 'git-branch', text: 'git-branch', imgSrc: '../../../dist/svg/git-branch.svg' },

        { value: 'git-commit', text: 'git-commit', imgSrc: '../../../dist/svg/git-commit.svg' },

        { value: 'git-merge', text: 'git-merge', imgSrc: '../../../dist/svg/git-merge.svg' },

        { value: 'git-pull-request', text: 'git-pull-request', imgSrc: '../../../dist/svg/git-pull-request.svg' },

        { value: 'github', text: 'github', imgSrc: '../../../dist/svg/github.svg' },

        { value: 'gitlab', text: 'gitlab', imgSrc: '../../../dist/svg/gitlab.svg' },

        { value: 'globe', text: 'globe', imgSrc: '../../../dist/svg/globe.svg' },

        { value: 'hard-drive', text: 'hard-drive', imgSrc: '../../../dist/svg/hard-drive.svg' },

        { value: 'hash', text: 'hash', imgSrc: '../../../dist/svg/hash.svg' },

        { value: 'headphones', text: 'headphones', imgSrc: '../../../dist/svg/headphones.svg' },

        { value: 'heart', text: 'heart', imgSrc: '../../../dist/svg/heart.svg' },

        { value: 'help-circle', text: 'help-circle', imgSrc: '../../../dist/svg/help-circle.svg' },

        { value: 'hexagon', text: 'hexagon', imgSrc: '../../../dist/svg/hexagon.svg' },

        { value: 'home', text: 'home', imgSrc: '../../../dist/svg/home.svg' },

        { value: 'image', text: 'image', imgSrc: '../../../dist/svg/image.svg' },

        { value: 'inbox', text: 'inbox', imgSrc: '../../../dist/svg/inbox.svg' },

        { value: 'instagram', text: 'instagram', imgSrc: '../dist/svg/instagram.svg' },

        { value: 'key', text: 'key', imgSrc: '../../../dist/svg/key.svg' },

        { value: 'layers', text: 'layers', imgSrc: '../../../dist/svg/layers.svg' },

        { value: 'layout', text: 'layout', imgSrc: '../../../dist/svg/layout.svg' },

        { value: 'link-2', text: 'link-2', imgSrc: '../../../dist/svg/link-2.svg' },

        { value: 'link', text: 'link', imgSrc: '../../../dist/svg/link.svg' },

        { value: 'linkedin', text: 'linkedin', imgSrc: '../../../dist/svg/linkedin.svg' },

        { value: 'list', text: 'list', imgSrc: '../../../dist/svg/list.svg' },

        { value: 'lock', text: 'lock', imgSrc: '../../../dist/svg/lock.svg' },

        { value: 'log-in', text: 'log-in', imgSrc: '../../../dist/svg/log-in.svg' },



         { value: 'log-out', text: 'log-out', imgSrc: '../../../dist/svg/log-out.svg' },

         { value: 'mail', text: 'mail', imgSrc: '../../../dist/svg/mail.svg' },

         { value: 'map-pin', text: 'map-pin', imgSrc: '../../../dist/svg/map-pin.svg' },

         { value: 'map', text: 'map', imgSrc: '../../../dist/svg/map.svg' },

         { value: 'maximize-2', text: 'maximize-2', imgSrc: '../../../dist/svg/maximize-2.svg' },

         { value: 'maximize', text: 'maximize', imgSrc: '../../../dist/svg/maximize.svg' },

         { value: 'meh', text: 'meh', imgSrc: '../../../dist/svg/meh.svg' },

         { value: 'menu', text: 'menu', imgSrc: '../../../dist/svg/menu.svg' },

         { value: 'message-circle', text: 'message-circle', imgSrc: '../../../dist/svg/message-circle.svg' },

         { value: 'message-square ', text: 'message-square ', imgSrc: '../../../dist/svg/message-square .svg' },

         { value: 'mic-off', text: 'mic-off', imgSrc: '../../../dist/svg/mic-off.svg' },

         { value: 'mic', text: 'mic', imgSrc: '../../../dist/svg/mic.svg' },

         { value: 'minimize-2', text: 'minimize-2', imgSrc: '../../../dist/svg/minimize-2.svg' },



         { value: 'minus', text: 'minus', imgSrc: '../../../dist/svg/minus.svg' },

         { value: 'monitor', text: 'monitor', imgSrc: '../../../dist/svg/monitor.svg' },

         { value: 'moon', text: 'moon', imgSrc: '../../../dist/svg/moon.svg' },

         { value: 'more-horizontal', text: 'more-horizontal', imgSrc: '../../../dist/svg/more-horizontal.svg' },

         { value: 'more-vertical', text: 'more-vertical', imgSrc: '../../../dist/svg/more-vertical.svg' },

         { value: 'mouse-pointer', text: 'mouse-pointer', imgSrc: '../../../dist/svg/mouse-pointer.svg' },

         { value: 'move', text: 'move', imgSrc: '../../../dist/svg/move.svg' },

         { value: 'music', text: 'music', imgSrc: '../../../dist/svg/music.svg' },

         { value: 'navigation-2', text: 'navigation-2', imgSrc: '../../../dist/svg/navigation-2.svg' },

         { value: 'navigation', text: 'navigation', imgSrc: '../../../dist/svg/navigation.svg' },

         { value: 'octagon', text: 'octagon', imgSrc: '../../../dist/svg/octagon.svg' },

         { value: 'package', text: 'package', imgSrc: '../../../dist/svg/package.svg' },

         { value: 'paperclip', text: 'paperclip', imgSrc: '../../../dist/svg/paperclip.svg' },

         { value: 'pause-circle', text: 'pause-circle', imgSrc: '../../../dist/svg/pause-circle.svg' },

         { value: 'pause', text: 'pause', imgSrc: '../../../dist/svg/pause.svg' },

         { value: 'pen-tool', text: 'pen-tool', imgSrc: '../../../dist/svg/pen-tool.svg' },

         { value: 'percent', text: 'percent', imgSrc: '../../../dist/svg/percent.svg' },

         { value: 'phone-call', text: 'phone-call', imgSrc: '../../../dist/svg/phone-call.svg' },

         { value: 'phone-forwarded', text: 'phone-forwarded', imgSrc: '../../../dist/svg/phone-forwarded.svg' },

         { value: 'phone-incoming', text: 'phone-incoming', imgSrc: '../../../dist/svg/phone-incoming.svg' },

         { value: 'phone-missed', text: 'phone-missed', imgSrc: '../../../dist/svg/phone-missed.svg' },

         { value: 'phone-off', text: 'phone-off', imgSrc: '../../../dist/svg/phone-off.svg' },

         { value: 'phone-outgoing', text: 'phone-outgoing', imgSrc: '../../../dist/svg/phone-outgoing.svg' },

         { value: 'phone', text: 'phone', imgSrc: '../../../dist/svg/phone.svg' },

         { value: 'pie-chart', text: 'pie-chart', imgSrc: '../../../dist/svg/pie-chart.svg' },

         { value: 'play-circle', text: 'play-circle', imgSrc: '../../../dist/svg/play-circle.svg' },

         { value: 'play', text: 'play', imgSrc: '../../../dist/svg/play.svg' },

         { value: 'plus-circle', text: 'plus-circle', imgSrc: '../../../dist/svg/plus-circle.svg' },

         { value: 'plus-square', text: 'plus-square', imgSrc: '../../../dist/svg/plus-square.svg' },

         { value: 'plus', text: 'plus', imgSrc: '../../../dist/svg/plus.svg' },

         { value: 'pocket', text: 'pocket', imgSrc: '../../../dist/svg/pocket.svg' },

         { value: 'power', text: 'power', imgSrc: '../../../dist/svg/power.svg' },

         { value: 'printer', text: 'printer', imgSrc: '../../../dist/svg/printer.svg' },

         { value: 'radio', text: 'radio', imgSrc: '../../../dist/svg/radio.svg' },

         { value: 'refresh-ccw', text: 'refresh-ccw', imgSrc: '../../../dist/svg/refresh-ccw.svg' },

         { value: 'refresh-cw', text: 'refresh-cw', imgSrc: '../../../dist/svg/refresh-cw.svg' },

         { value: 'repeat', text: 'repeat', imgSrc: '../../../dist/svg/repeat.svg' },

         { value: 'rewind', text: 'rewind', imgSrc: '../../../dist/svg/rewind.svg' },

         { value: 'rotate-ccw', text: 'rotate-ccw', imgSrc: '../../../dist/svg/rotate-ccw.svg' },

         { value: 'rotate-cw', text: 'rotate-cw', imgSrc: '../../../dist/svg/rotate-cw.svg' },

         { value: 'save', text: 'save', imgSrc: '../../../dist/svg/save.svg' },

         { value: 'scissors', text: 'scissors', imgSrc: '../../../dist/svg/scissors.svg' },

         { value: 'search', text: 'search', imgSrc: '../../../dist/svg/search.svg' },

         { value: 'send', text: 'send', imgSrc: '../../../dist/svg/send.svg' },

         { value: 'settings', text: 'settings', imgSrc: '../../../dist/svg/settings.svg' },

         { value: 'share-2', text: 'share-2', imgSrc: '../../../dist/svg/share-2.svg' },

         { value: 'shield-off', text: 'shield-off', imgSrc: '../../../dist/svg/shield-off.svg' },

         { value: 'shield', text: 'shield', imgSrc: '../../../dist/svg/shield.svg' },

         { value: 'shopping-bag', text: 'shopping-bag', imgSrc: '../../../dist/svg/shopping-bag.svg' },

         { value: 'shopping-cart', text: 'shopping-cart', imgSrc: '../../../dist/svg/shopping-cart.svg' },

         { value: 'shuffle', text: 'shuffle', imgSrc: '../../../dist/svg/shuffle.svg' },

         { value: 'skip-back', text: 'skip-back', imgSrc: '../../../dist/svg/skip-back.svg' },

         { value: 'skip-forward', text: 'skip-forward', imgSrc: '../../../dist/svg/skip-forward.svg' },

         { value: 'slack', text: 'slack', imgSrc: '../../../dist/svg/slack.svg' },

         { value: 'slash', text: 'slash', imgSrc: '../../../dist/svg/slash.svg' },

         { value: 'sliders', text: 'sliders', imgSrc: '../../../dist/svg/sliders.svg' },

         { value: 'smartphone', text: 'smartphone', imgSrc: '../../../dist/svg/smartphone.svg' },

         { value: 'smile', text: 'smile', imgSrc: '../../../dist/svg/smile.svg' },

         { value: 'speaker', text: 'speaker', imgSrc: '../../../dist/svg/speaker.svg' },

         { value: 'star', text: 'star', imgSrc: '../../../dist/svg/star.svg' },

         { value: 'stop-circle', text: 'stop-circle', imgSrc: '../../../dist/svg/stop-circle.svg' },

         { value: 'sun', text: 'sun', imgSrc: '../../../dist/svg/sun.svg' },

         { value: 'sunset', text: 'sunset', imgSrc: '../../../dist/svg/sunset.svg' },

         { value: 'tablet', text: 'tablet', imgSrc: '../../../dist/svg/tablet.svg' },



         { value: 'tag', text: 'tag', imgSrc: '../../../dist/svg/tag.svg' },



         { value: 'target', text: 'target', imgSrc: '../../../dist/svg/target.svg' },

         { value: 'terminal', text: 'terminal', imgSrc: '../../../dist/svg/terminal.svg' },

         { value: 'thermometer', text: 'thermometer', imgSrc: '../../../dist/svg/thermometer.svg' },

         { value: 'thumbs-down', text: 'thumbs-down', imgSrc: '../../../dist/svg/thumbs-down.svg' },

         { value: 'thumbs-up', text: 'thumbs-up', imgSrc: '../../../dist/svg/thumbs-up.svg' },

         { value: 'toggle-left', text: 'toggle-left', imgSrc: '../../../dist/svg/toggle-left.svg' },

         { value: 'toggle-right', text: 'toggle-right', imgSrc: '../../../dist/svg/toggle-right.svg' },

         { value: 'trash-2', text: 'trash-2', imgSrc: '../../../dist/svg/trash-2.svg' },

         { value: 'triangle', text: 'triangle', imgSrc: '../../../dist/svg/triangle.svg' },

         { value: 'truck', text: 'truck', imgSrc: '../../../dist/svg/truck.svg' },

         { value: 'tv', text: 'tv', imgSrc: '../../../dist/svg/tv.svg' },

         { value: 'twitch', text: 'twitch', imgSrc: '../../../dist/svg/twitch.svg' },

         { value: 'twitter', text: 'twitter', imgSrc: '../../../dist/svg/twitter.svg' },

         { value: 'type', text: 'type', imgSrc: '../../../dist/svg/type.svg' },

         { value: 'umbrella', text: 'umbrella', imgSrc: '../../../dist/svg/umbrella.svg' },

         { value: 'unlock', text: 'unlock', imgSrc: '../../../dist/svg/unlock.svg' },

         { value: 'user-check', text: 'user-check', imgSrc: '../../../dist/svg/user-check.svg' },

         { value: 'user-minus', text: 'user-minus', imgSrc: '../../../dist/svg/user-minus.svg' },

         { value: 'user-plus', text: 'user-plus', imgSrc: '../../../dist/svg/user-plus.svg' },

         { value: 'user-x', text: 'user-x', imgSrc: '../../../dist/svg/user-x.svg' },

         { value: 'user', text: 'user', imgSrc: '../../../dist/svg/user.svg' },

    { value: 'users', text: 'users', imgSrc: '../../../dist/svg/users.svg' },

    { value: 'video-off', text: 'video-off', imgSrc: '../../../dist/svg/video-off.svg' },

    { value: 'video', text: 'video', imgSrc: '../../../dist/svg/video.svg' },

    { value: 'voicemail', text: 'voicemail', imgSrc: '../../../dist/svg/voicemail.svg' },

    { value: 'volume-1', text: 'volume-1', imgSrc: '../../../dist/svg/volume-1.svg' },

    { value: 'volume-2', text: 'volume-2', imgSrc: '../../../dist/svg/volume-2.svg' },

    { value: 'volume-x', text: 'volume-x', imgSrc: '../../../dist/svg/volume-x.svg' },

    { value: 'volume', text: 'volume', imgSrc: '../../../dist/svg/volume.svg' },

    { value: 'watch', text: 'watch', imgSrc: '../../../dist/svg/watch.svg' },

    { value: 'wifi-off', text: 'wifi-off', imgSrc: '../../../dist/svg/wifi-off.svg' },

    { value: 'wifi', text: 'wifi', imgSrc: '../../../dist/svg/wifi.svg' },

    { value: 'wind', text: 'wind', imgSrc: '../../../dist/svg/wind.svg' },

    { value: 'x-circle', text: 'x-circle', imgSrc: '../../../dist/svg/x-circle.svg' },

    { value: 'x-octagon', text: 'x-octagon', imgSrc: '../../../dist/svg/x-octagon.svg' },

    { value: 'x-square', text: 'x-square', imgSrc: '../../../dist/svg/x-square.svg' },

    { value: 'x', text: 'x', imgSrc: '../../../dist/svg/x.svg' },

    { value: 'youtube', text: 'youtube', imgSrc: '../../../dist/svg/youtube.svg' },

    { value: 'zap-off', text: 'zap-off', imgSrc: '../../../dist/svg/zap-off.svg' },

    { value: 'zap', text: 'zap', imgSrc: '../../../dist/svg/zap.svg' },

    { value: 'zoom-in', text: 'zoom-in', imgSrc: '../../../dist/svg/zoom-in.svg' },

    { value: 'zoom-out', text: 'zoom-out', imgSrc: '../../../dist/svg/zoom-out.svg' },            



  ];

  

  for (var i = 0; i < opciones.length; i++) {

    var option = document.createElement('option');

    option.value = opciones[i].value;

    option.text = opciones[i].text;

    option.setAttribute('data-img-src', opciones[i].imgSrc);

    select.appendChild(option);

  }

  <?php

if($action=="editar"){

    echo"

    $('#Icon_Fa_Modulo').val('$Icon_Fa_Modulo');";

}

?>

});



</script>

<script type="text/javascript">

  window.onload=function(){

    window.scrollTo(0,0);

    window.parent.scrollTo(0,0);

    parent.document.getElementById('loadingpage').style.display='none';

  }



  function loadingpage(){

      parent.document.getElementById('loadingpage').style.display='block';                     

   }

</script>

</body>

</center>

</html>