var/cache/dev/twig/95/958d4a2c515ae0f20302faebd42f4bbf.php line 537

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @crud\newedit.html.twig */
  14. class __TwigTemplate_a0a416e8ea5e9daab6bc9b1862438da7 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'jquery' => [$this'block_jquery'],
  24.             'url_mapa' => [$this'block_url_mapa'],
  25.             'check_url_mapa' => [$this'block_check_url_mapa'],
  26.             'text_bad_url_mapa' => [$this'block_text_bad_url_mapa'],
  27.             'url_mapaPunto' => [$this'block_url_mapaPunto'],
  28.             'check_url_mapaPunto' => [$this'block_check_url_mapaPunto'],
  29.             'text_bad_url_mapaPunto' => [$this'block_text_bad_url_mapaPunto'],
  30.             'crud' => [$this'block_crud'],
  31.             'formulario' => [$this'block_formulario'],
  32.         ];
  33.     }
  34.     protected function doGetParent(array $context)
  35.     {
  36.         // line 1
  37.         return "@crud\\crud.html.twig";
  38.     }
  39.     protected function doDisplay(array $context, array $blocks = [])
  40.     {
  41.         $macros $this->macros;
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@crud\\newedit.html.twig"));
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@crud\\newedit.html.twig"));
  46.         $this->parent $this->loadTemplate("@crud\\crud.html.twig""@crud\\newedit.html.twig"1);
  47.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  48.         
  49.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  50.         
  51.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  52.     }
  53.     // line 3
  54.     public function block_jquery($context, array $blocks = [])
  55.     {
  56.         $macros $this->macros;
  57.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""jquery"));
  59.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""jquery"));
  61.         // line 4
  62.         echo "    ";
  63.         $this->displayParentBlock("jquery"$context$blocks);
  64.         echo "
  65.     <script type=\"text/javascript\">
  66.         \$(function()
  67.         {
  68.             \$('.hide_item_";
  69.         // line 9
  70.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'9$this->source); })()), "html"nulltrue);
  71.         echo "').click(function(e){
  72.                 e.preventDefault();
  73.                 if (confirm(\"";
  74.         // line 11
  75.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("delete.confirm", [], "crud"), "html"nulltrue);
  76.         echo "\"))
  77.                 {
  78.                     var id=\$(this).attr(\"item_id\");
  79.                     var adjunto='hidefile_";
  80.         // line 14
  81.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'14$this->source); })()), "html"nulltrue);
  82.         echo "_'+id;
  83.                     var control='file_";
  84.         // line 15
  85.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'15$this->source); })()), "html"nulltrue);
  86.         echo "_'+id;
  87.                     adjunto=document.getElementById(adjunto);
  88.                     \$(adjunto).addClass(\"hide\");
  89.                     control=document.getElementById(control);
  90.                     \$(control).removeClass(\"hide\");
  91.                     \$(control).parents('form').change();
  92.                 }
  93.             });
  94.             \$('.just_numbers').keypress(function(e){
  95.                 if (e.which<48 || e.which>57 )
  96.                     e.preventDefault();
  97.             });
  98.             var cargainicial";
  99.         // line 29
  100.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'29$this->source); })()), "html"nulltrue);
  101.         echo " = true;
  102.             \$( \"#dialog-mapa-";
  103.         // line 30
  104.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'30$this->source); })()), "html"nulltrue);
  105.         echo "\" ).dialog({
  106.                 autoOpen: false,
  107.                 height: 610,
  108.                 width: 750,
  109.                 modal: true,
  110.                 resizable: false,
  111.                 title_html: true,
  112.                 title: '<div id=\"texto\" class=\"widget-header widget-header-small\"><h4 class=\"smaller red\"><i class=\"fas fa-globe\"></i>&nbsp;Definir Ubicación en Mapa</h4></div>',
  113.                 buttons: {
  114.                     Cancelar: function() {
  115.                         \$( \"#dialog-mapa-";
  116.         // line 41
  117.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'41$this->source); })()), "html"nulltrue);
  118.         echo "\" ).dialog( \"close\" );
  119.                     }
  120.                 }
  121.             });
  122.             \$( \"#dialog-relacion-";
  123.         // line 46
  124.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'46$this->source); })()), "html"nulltrue);
  125.         echo "\" ).dialog({
  126.                 autoOpen: false,
  127.                 height: 500,
  128.                 width: 800,
  129.                 modal: true,
  130.                 resizable: false,
  131.                 title_html: true,
  132.                 title: '<div id=\"texto\" class=\"widget-header widget-header-small\"><h4 class=\"smaller red\"><i class=\"fas fa-globe\"></i>&nbsp;Definir nuevo elemento</h4></div>',
  133.                 beforeClose: function(){
  134.                     \$('#dialog_";
  135.         // line 55
  136.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'55$this->source); })()), "html"nulltrue);
  137.         echo "' ).parent().removeClass(\"hide\");
  138.                 },
  139.                 open: function(){
  140.                     \$('#dialog_";
  141.         // line 58
  142.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'58$this->source); })()), "html"nulltrue);
  143.         echo "' ).parent().addClass(\"hide\");
  144.                 },
  145.                 buttons: {
  146.                     Grabar: function() {
  147.                         var routeClassName = \$('#relacionnombre-";
  148.         // line 62
  149.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'62$this->source); })()), "html"nulltrue);
  150.         echo "').val();
  151.                         var form = \$('#crud_form_'+routeClassName);
  152.                         if (\$(form).find('.wrong_email').length>0)
  153.                         {
  154.                             alert('Correo electrónico incorrecto');
  155.                             return false;
  156.                         }
  157.                         \$( \"#dialog-relacion-";
  158.         // line 69
  159.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'69$this->source); })()), "html"nulltrue);
  160.         echo "\" ).parent().mask(\"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Grabando...\");
  161.                         \$(form).ajaxSubmit({
  162.                             type: form.attr('method'),
  163.                             url: form.attr('action'),
  164.                             dataType: 'json',
  165.                             data: { _xml_http_request: true },
  166.                             success: function(data) {
  167.                                 if (data.ok)
  168.                                 {
  169.                                     var id_nuevo=data.id;
  170.                                     var combo = \$('#relaciontarget-";
  171.         // line 79
  172.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'79$this->source); })()), "html"nulltrue);
  173.         echo "').val();
  174.                                     \$('#'+combo+' option:selected').removeProp('selected');
  175.                                     \$('#'+combo).append('<option selected=\"true\" value=\"'+data.id+'\">'+data.txt+'</option>')
  176.                                     \$( \"#dialog-relacion-";
  177.         // line 82
  178.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'82$this->source); })()), "html"nulltrue);
  179.         echo "\" ).parent().unmask();
  180.                                     \$( \"#dialog-relacion-";
  181.         // line 83
  182.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'83$this->source); })()), "html"nulltrue);
  183.         echo "\" ).dialog( \"close\" );
  184.                                  /*   var routeClassName = \$('#'+combo).attr('relation');
  185.                                     var baseSite = \$('#baseSite').val();
  186.                                     var url = baseSite + \"all/items/\"+routeClassName+\"/\"+id_nuevo;
  187.                                     \$('#'+combo).load(url, function(){
  188.                                         \$( \"#dialog-relacion-";
  189.         // line 89
  190.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'89$this->source); })()), "html"nulltrue);
  191.         echo "\" ).parent().unmask();
  192.                                         \$( \"#dialog-relacion-";
  193.         // line 90
  194.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'90$this->source); })()), "html"nulltrue);
  195.         echo "\" ).dialog( \"close\" );
  196.                                     });*/
  197.                                 }
  198.                                 else
  199.                                 {
  200.                                     \$( \"#dialog-relacion-";
  201.         // line 95
  202.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'95$this->source); })()), "html"nulltrue);
  203.         echo "\" ).parent().unmask();
  204.                                     showError(bootbox,data.error);
  205.                                 }
  206.                             }
  207.                         })
  208.                     },
  209.                     Cancelar: function() {
  210.                         \$( \"#dialog-relacion-";
  211.         // line 103
  212.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'103$this->source); })()), "html"nulltrue);
  213.         echo "\" ).dialog( \"close\" );
  214.                     }
  215.                 }
  216.             });
  217.             \$(\".botonmapa\").click(function(e){
  218.                 e.preventDefault();
  219.                 var baseSite = \$('#baseSite').val();
  220.                 var idcampo = \$(this).attr('itemid');
  221.                 var tipoDibujo = \$(this).attr('geom');
  222.                 var urlOk = true;
  223.                 ";
  224.         // line 114
  225.         $this->displayBlock('url_mapa'$context$blocks);
  226.         // line 119
  227.         echo "                ";
  228.         $this->displayBlock('check_url_mapa'$context$blocks);
  229.         // line 121
  230.         echo "                if (urlOk)
  231.                 {
  232.                     \$(\"#dialog-mapa-";
  233.         // line 123
  234.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'123$this->source); })()), "html"nulltrue);
  235.         echo "\").dialog(\"open\");
  236.                     if (cargainicial";
  237.         // line 124
  238.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'124$this->source); })()), "html"nulltrue);
  239.         echo ")
  240.                     {
  241.                         \$('#dialog-mapa-";
  242.         // line 126
  243.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'126$this->source); })()), "html"nulltrue);
  244.         echo "').load(url);
  245.                         cargainicial";
  246.         // line 127
  247.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'127$this->source); })()), "html"nulltrue);
  248.         echo " = false;
  249.                     }
  250.                 }
  251.                 else
  252.                     alert('";
  253.         // line 131
  254.         $this->displayBlock('text_bad_url_mapa'$context$blocks);
  255.         echo "');
  256.             });
  257.             \$(\".botonmapaPunto\").click(function(e){
  258.                 e.preventDefault();
  259.                 var baseSite = \$('#baseSite').val();
  260.                 var idcampo = \$(this).attr('itemid');
  261.                 var tipoDibujo = \$(this).attr('geom');
  262.                 var urlOk = true;
  263.                 ";
  264.         // line 140
  265.         $this->displayBlock('url_mapaPunto'$context$blocks);
  266.         // line 145
  267.         echo "                ";
  268.         $this->displayBlock('check_url_mapaPunto'$context$blocks);
  269.         // line 161
  270.         echo "
  271.             });
  272.             \$('[data-rel=tooltip]').tooltip({container:'body'});
  273.             \$('[data-rel=popover]').popover({container:'body'});
  274. //            \$('[data-rel=\"tooltip\"]').tooltip();
  275.             \$(\".dual-list\").each(function () {
  276.                 var lista = \$(this).bootstrapDualListbox({infoTextFiltered: '<span class=\"label label-purple label-lg\">";
  277.         // line 169
  278.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("opciones.filtrado", [], "crud"), "html"nulltrue);
  279.         echo "</span>'});
  280.                 var container1 = lista.bootstrapDualListbox('getContainer');
  281.                     container1.find('.btn').addClass('btn-white btn-info btn-bold');
  282.                     container1.find('.box1').prepend('<div style=\"text-align: center\">";
  283.         // line 172
  284.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("opciones.disponibles", [], "crud"), "html"nulltrue);
  285.         echo "</div>');
  286.                     container1.find('.box2').prepend('<div style=\"text-align: center\">";
  287.         // line 173
  288.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("opciones.seleccionados", [], "crud"), "html"nulltrue);
  289.         echo "</div>');
  290.             });
  291.             \$('.chosen-select.chosen-pending').chosen({allow_single_deselect:true});
  292.             \$('.chosen-select.chosen-pending').removeClass('chosen-pending');
  293.             \$('.email').change(function(e){
  294.                 var filter = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9_\\.\\-])+\\.)+([a-zA-Z0-9]{2,4})+\$/;
  295.                 var email = \$(this).val();
  296.                 if (!filter.test(email))
  297.                 {
  298.                     \$(this).css('color', 'red');
  299.                     \$(this).focus();
  300.                     \$(this).addClass('wrong_email');
  301.                 }
  302.                 else
  303.                 {
  304.                     \$(this).css('color', 'black');
  305.                     \$(this).removeClass('wrong_email');
  306.                 }
  307.             });
  308.             \$('#crud_form_";
  309.         // line 196
  310.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'196$this->source); })()), "html"nulltrue);
  311.         echo "').submit(function(e){
  312.                 if (\$(this).find('.wrong_email').length>0)
  313.                 {
  314.                     alert('Correo electrónico incorrecto');
  315.                     e.preventDefault();
  316.                 }
  317.             });
  318.         });
  319. \t
  320.     </script>    
  321. ";
  322.         
  323.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  324.         
  325.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  326.     }
  327.     // line 114
  328.     public function block_url_mapa($context, array $blocks = [])
  329.     {
  330.         $macros $this->macros;
  331.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  332.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""url_mapa"));
  333.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  334.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""url_mapa"));
  335.         // line 115
  336.         echo "                    var url = \"";
  337.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("dibujarGeometria", ["tipoDibujo" => "__TIPO__""idCampo" => "__CAMPO__""idContenedorMapa" => ("dialog-mapa-" . (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'115$this->source); })()))]), "html"nulltrue);
  338.         echo "\";
  339.                     url =url.replace('__TIPO__', tipoDibujo); 
  340.                     url =url.replace('__CAMPO__', idcampo); 
  341.                 ";
  342.         
  343.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  344.         
  345.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  346.     }
  347.     // line 119
  348.     public function block_check_url_mapa($context, array $blocks = [])
  349.     {
  350.         $macros $this->macros;
  351.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  352.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""check_url_mapa"));
  353.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  354.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""check_url_mapa"));
  355.         // line 120
  356.         echo "                ";
  357.         
  358.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  359.         
  360.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  361.     }
  362.     // line 131
  363.     public function block_text_bad_url_mapa($context, array $blocks = [])
  364.     {
  365.         $macros $this->macros;
  366.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  367.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""text_bad_url_mapa"));
  368.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  369.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""text_bad_url_mapa"));
  370.         
  371.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  372.         
  373.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  374.     }
  375.     // line 140
  376.     public function block_url_mapaPunto($context, array $blocks = [])
  377.     {
  378.         $macros $this->macros;
  379.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  380.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""url_mapaPunto"));
  381.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  382.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""url_mapaPunto"));
  383.         // line 141
  384.         echo "                    var url = \"";
  385.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("dibujarPunto", ["tipoDibujo" => "__TIPO__""idCampo" => "__CAMPO__""idContenedorMapa" => ("dialog-mapa-" . (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'141$this->source); })()))]), "html"nulltrue);
  386.         echo "\";
  387.                     url =url.replace('__TIPO__', tipoDibujo); 
  388.                     url =url.replace('__CAMPO__', idcampo); 
  389.                 ";
  390.         
  391.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  392.         
  393.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  394.     }
  395.     // line 145
  396.     public function block_check_url_mapaPunto($context, array $blocks = [])
  397.     {
  398.         $macros $this->macros;
  399.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  400.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""check_url_mapaPunto"));
  401.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  402.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""check_url_mapaPunto"));
  403.         // line 146
  404.         echo "
  405.                     if (urlOk)
  406.                     {
  407.                        \$(\"#dialog-mapa-";
  408.         // line 149
  409.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'149$this->source); })()), "html"nulltrue);
  410.         echo "\").parent().mask('Mostrando ubicación, espere....');
  411.                         \$(\"#dialog-mapa-";
  412.         // line 151
  413.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'151$this->source); })()), "html"nulltrue);
  414.         echo "\").dialog(\"open\");
  415.                         if(cargainicial";
  416.         // line 152
  417.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'152$this->source); })()), "html"nulltrue);
  418.         echo "){
  419.                             \$('#dialog-mapa-";
  420.         // line 153
  421.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'153$this->source); })()), "html"nulltrue);
  422.         echo "').load(url);
  423.                             cargainicial";
  424.         // line 154
  425.         echo twig_escape_filter($this->env, (isset($context["routeClassName"]) || array_key_exists("routeClassName"$context) ? $context["routeClassName"] : (function () { throw new RuntimeError('Variable "routeClassName" does not exist.'154$this->source); })()), "html"nulltrue);
  426.         echo " = false;
  427.                         }
  428.                     }
  429.                     else
  430.                         alert('";
  431.         // line 158
  432.         $this->displayBlock('text_bad_url_mapaPunto'$context$blocks);
  433.         echo "');
  434.                 ";
  435.         
  436.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  437.         
  438.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  439.     }
  440.     public function block_text_bad_url_mapaPunto($context, array $blocks = [])
  441.     {
  442.         $macros $this->macros;
  443.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  444.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""text_bad_url_mapaPunto"));
  445.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  446.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""text_bad_url_mapaPunto"));
  447.         
  448.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  449.         
  450.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  451.     }
  452.     // line 210
  453.     public function block_crud($context, array $blocks = [])
  454.     {
  455.         $macros $this->macros;
  456.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  457.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""crud"));
  458.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  459.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""crud"));
  460.         // line 211
  461.         echo "    <div class=\"widget-box transparent\">
  462.         ";
  463.         // line 226
  464.         echo "        
  465.         <div class=\"widget-body\" style=\"display: block;\">
  466.             <div class=\"widget-main no-padding\">
  467.                 ";
  468.         // line 229
  469.         $this->displayBlock('formulario'$context$blocks);
  470.         // line 231
  471.         echo "            </div>
  472.         </div>
  473.     </div>
  474. ";
  475.         
  476.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  477.         
  478.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  479.     }
  480.     // line 229
  481.     public function block_formulario($context, array $blocks = [])
  482.     {
  483.         $macros $this->macros;
  484.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  485.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""formulario"));
  486.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  487.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""formulario"));
  488.         // line 230
  489.         echo "                ";
  490.         
  491.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  492.         
  493.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  494.     }
  495.     public function getTemplateName()
  496.     {
  497.         return "@crud\\newedit.html.twig";
  498.     }
  499.     public function isTraitable()
  500.     {
  501.         return false;
  502.     }
  503.     public function getDebugInfo()
  504.     {
  505.         return array (  562 => 230,  552 => 229,  539 => 231,  537 => 229,  532 => 226,  529 => 211,  519 => 210,  489 => 158,  482 => 154,  478 => 153,  474 => 152,  470 => 151,  465 => 149,  460 => 146,  450 => 145,  435 => 141,  425 => 140,  407 => 131,  397 => 120,  387 => 119,  372 => 115,  362 => 114,  339 => 196,  313 => 173,  309 => 172,  303 => 169,  293 => 161,  290 => 145,  288 => 140,  276 => 131,  269 => 127,  265 => 126,  260 => 124,  256 => 123,  252 => 121,  249 => 119,  247 => 114,  233 => 103,  222 => 95,  214 => 90,  210 => 89,  201 => 83,  197 => 82,  191 => 79,  178 => 69,  168 => 62,  161 => 58,  155 => 55,  143 => 46,  135 => 41,  121 => 30,  117 => 29,  100 => 15,  96 => 14,  90 => 11,  85 => 9,  76 => 4,  66 => 3,  43 => 1,);
  506.     }
  507.     public function getSourceContext()
  508.     {
  509.         return new Source("{% extends \"@crud\\\\crud.html.twig\" %}
  510. {% block jquery %}
  511.     {{ parent() }}
  512.     <script type=\"text/javascript\">
  513.         \$(function()
  514.         {
  515.             \$('.hide_item_{{ routeClassName }}').click(function(e){
  516.                 e.preventDefault();
  517.                 if (confirm(\"{{ 'delete.confirm' | trans({}, 'crud') }}\"))
  518.                 {
  519.                     var id=\$(this).attr(\"item_id\");
  520.                     var adjunto='hidefile_{{ routeClassName }}_'+id;
  521.                     var control='file_{{ routeClassName }}_'+id;
  522.                     adjunto=document.getElementById(adjunto);
  523.                     \$(adjunto).addClass(\"hide\");
  524.                     control=document.getElementById(control);
  525.                     \$(control).removeClass(\"hide\");
  526.                     \$(control).parents('form').change();
  527.                 }
  528.             });
  529.             \$('.just_numbers').keypress(function(e){
  530.                 if (e.which<48 || e.which>57 )
  531.                     e.preventDefault();
  532.             });
  533.             var cargainicial{{ routeClassName }} = true;
  534.             \$( \"#dialog-mapa-{{ routeClassName }}\" ).dialog({
  535.                 autoOpen: false,
  536.                 height: 610,
  537.                 width: 750,
  538.                 modal: true,
  539.                 resizable: false,
  540.                 title_html: true,
  541.                 title: '<div id=\"texto\" class=\"widget-header widget-header-small\"><h4 class=\"smaller red\"><i class=\"fas fa-globe\"></i>&nbsp;Definir Ubicación en Mapa</h4></div>',
  542.                 buttons: {
  543.                     Cancelar: function() {
  544.                         \$( \"#dialog-mapa-{{ routeClassName }}\" ).dialog( \"close\" );
  545.                     }
  546.                 }
  547.             });
  548.             \$( \"#dialog-relacion-{{ routeClassName }}\" ).dialog({
  549.                 autoOpen: false,
  550.                 height: 500,
  551.                 width: 800,
  552.                 modal: true,
  553.                 resizable: false,
  554.                 title_html: true,
  555.                 title: '<div id=\"texto\" class=\"widget-header widget-header-small\"><h4 class=\"smaller red\"><i class=\"fas fa-globe\"></i>&nbsp;Definir nuevo elemento</h4></div>',
  556.                 beforeClose: function(){
  557.                     \$('#dialog_{{ routeClassName }}' ).parent().removeClass(\"hide\");
  558.                 },
  559.                 open: function(){
  560.                     \$('#dialog_{{ routeClassName }}' ).parent().addClass(\"hide\");
  561.                 },
  562.                 buttons: {
  563.                     Grabar: function() {
  564.                         var routeClassName = \$('#relacionnombre-{{ routeClassName }}').val();
  565.                         var form = \$('#crud_form_'+routeClassName);
  566.                         if (\$(form).find('.wrong_email').length>0)
  567.                         {
  568.                             alert('Correo electrónico incorrecto');
  569.                             return false;
  570.                         }
  571.                         \$( \"#dialog-relacion-{{ routeClassName }}\" ).parent().mask(\"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Grabando...\");
  572.                         \$(form).ajaxSubmit({
  573.                             type: form.attr('method'),
  574.                             url: form.attr('action'),
  575.                             dataType: 'json',
  576.                             data: { _xml_http_request: true },
  577.                             success: function(data) {
  578.                                 if (data.ok)
  579.                                 {
  580.                                     var id_nuevo=data.id;
  581.                                     var combo = \$('#relaciontarget-{{ routeClassName }}').val();
  582.                                     \$('#'+combo+' option:selected').removeProp('selected');
  583.                                     \$('#'+combo).append('<option selected=\"true\" value=\"'+data.id+'\">'+data.txt+'</option>')
  584.                                     \$( \"#dialog-relacion-{{ routeClassName }}\" ).parent().unmask();
  585.                                     \$( \"#dialog-relacion-{{ routeClassName }}\" ).dialog( \"close\" );
  586.                                  /*   var routeClassName = \$('#'+combo).attr('relation');
  587.                                     var baseSite = \$('#baseSite').val();
  588.                                     var url = baseSite + \"all/items/\"+routeClassName+\"/\"+id_nuevo;
  589.                                     \$('#'+combo).load(url, function(){
  590.                                         \$( \"#dialog-relacion-{{ routeClassName }}\" ).parent().unmask();
  591.                                         \$( \"#dialog-relacion-{{ routeClassName }}\" ).dialog( \"close\" );
  592.                                     });*/
  593.                                 }
  594.                                 else
  595.                                 {
  596.                                     \$( \"#dialog-relacion-{{ routeClassName }}\" ).parent().unmask();
  597.                                     showError(bootbox,data.error);
  598.                                 }
  599.                             }
  600.                         })
  601.                     },
  602.                     Cancelar: function() {
  603.                         \$( \"#dialog-relacion-{{ routeClassName }}\" ).dialog( \"close\" );
  604.                     }
  605.                 }
  606.             });
  607.             \$(\".botonmapa\").click(function(e){
  608.                 e.preventDefault();
  609.                 var baseSite = \$('#baseSite').val();
  610.                 var idcampo = \$(this).attr('itemid');
  611.                 var tipoDibujo = \$(this).attr('geom');
  612.                 var urlOk = true;
  613.                 {% block url_mapa %}
  614.                     var url = \"{{ path('dibujarGeometria', {'tipoDibujo': '__TIPO__', 'idCampo': '__CAMPO__', 'idContenedorMapa': 'dialog-mapa-'~routeClassName}) }}\";
  615.                     url =url.replace('__TIPO__', tipoDibujo); 
  616.                     url =url.replace('__CAMPO__', idcampo); 
  617.                 {% endblock url_mapa %}
  618.                 {% block check_url_mapa %}
  619.                 {% endblock check_url_mapa %}
  620.                 if (urlOk)
  621.                 {
  622.                     \$(\"#dialog-mapa-{{ routeClassName }}\").dialog(\"open\");
  623.                     if (cargainicial{{ routeClassName }})
  624.                     {
  625.                         \$('#dialog-mapa-{{ routeClassName }}').load(url);
  626.                         cargainicial{{ routeClassName }} = false;
  627.                     }
  628.                 }
  629.                 else
  630.                     alert('{% block text_bad_url_mapa %}{% endblock text_bad_url_mapa %}');
  631.             });
  632.             \$(\".botonmapaPunto\").click(function(e){
  633.                 e.preventDefault();
  634.                 var baseSite = \$('#baseSite').val();
  635.                 var idcampo = \$(this).attr('itemid');
  636.                 var tipoDibujo = \$(this).attr('geom');
  637.                 var urlOk = true;
  638.                 {% block url_mapaPunto %}
  639.                     var url = \"{{ path('dibujarPunto', {'tipoDibujo': '__TIPO__', 'idCampo': '__CAMPO__', 'idContenedorMapa': 'dialog-mapa-'~routeClassName}) }}\";
  640.                     url =url.replace('__TIPO__', tipoDibujo); 
  641.                     url =url.replace('__CAMPO__', idcampo); 
  642.                 {% endblock url_mapaPunto %}
  643.                 {% block check_url_mapaPunto %}
  644.                     if (urlOk)
  645.                     {
  646.                        \$(\"#dialog-mapa-{{ routeClassName }}\").parent().mask('Mostrando ubicación, espere....');
  647.                         \$(\"#dialog-mapa-{{ routeClassName }}\").dialog(\"open\");
  648.                         if(cargainicial{{ routeClassName }}){
  649.                             \$('#dialog-mapa-{{ routeClassName }}').load(url);
  650.                             cargainicial{{ routeClassName }} = false;
  651.                         }
  652.                     }
  653.                     else
  654.                         alert('{% block text_bad_url_mapaPunto %}{% endblock text_bad_url_mapaPunto %}');
  655.                 {% endblock check_url_mapaPunto %}
  656.             });
  657.             \$('[data-rel=tooltip]').tooltip({container:'body'});
  658.             \$('[data-rel=popover]').popover({container:'body'});
  659. //            \$('[data-rel=\"tooltip\"]').tooltip();
  660.             \$(\".dual-list\").each(function () {
  661.                 var lista = \$(this).bootstrapDualListbox({infoTextFiltered: '<span class=\"label label-purple label-lg\">{{ 'opciones.filtrado' | trans({}, 'crud') }}</span>'});
  662.                 var container1 = lista.bootstrapDualListbox('getContainer');
  663.                     container1.find('.btn').addClass('btn-white btn-info btn-bold');
  664.                     container1.find('.box1').prepend('<div style=\"text-align: center\">{{ 'opciones.disponibles' | trans({}, 'crud') }}</div>');
  665.                     container1.find('.box2').prepend('<div style=\"text-align: center\">{{ 'opciones.seleccionados' | trans({}, 'crud') }}</div>');
  666.             });
  667.             \$('.chosen-select.chosen-pending').chosen({allow_single_deselect:true});
  668.             \$('.chosen-select.chosen-pending').removeClass('chosen-pending');
  669.             \$('.email').change(function(e){
  670.                 var filter = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9_\\.\\-])+\\.)+([a-zA-Z0-9]{2,4})+\$/;
  671.                 var email = \$(this).val();
  672.                 if (!filter.test(email))
  673.                 {
  674.                     \$(this).css('color', 'red');
  675.                     \$(this).focus();
  676.                     \$(this).addClass('wrong_email');
  677.                 }
  678.                 else
  679.                 {
  680.                     \$(this).css('color', 'black');
  681.                     \$(this).removeClass('wrong_email');
  682.                 }
  683.             });
  684.             \$('#crud_form_{{ routeClassName }}').submit(function(e){
  685.                 if (\$(this).find('.wrong_email').length>0)
  686.                 {
  687.                     alert('Correo electrónico incorrecto');
  688.                     e.preventDefault();
  689.                 }
  690.             });
  691.         });
  692. \t
  693.     </script>    
  694. {% endblock %}
  695. {% block crud %}
  696.     <div class=\"widget-box transparent\">
  697.         {#% block ico_heading %}
  698.             <div class=\"widget-header widget-header-flat\">
  699.                 <h4 class=\"widget-title lighter\">
  700.                     <i class=\"fas fa-pencil-alt orange\"></i>
  701.                     {% block principal_heading %}
  702.                     {% endblock %}
  703.                 </h4>
  704.                 <!--div class=\"widget-toolbar\">
  705.                     <a href=\"#\" data-action=\"collapse\">
  706.                         <i class=\"fas fa-chevron-up\"></i>
  707.                     </a>
  708.                 </div-->
  709.             </div>
  710.         {% endblock %#}        
  711.         <div class=\"widget-body\" style=\"display: block;\">
  712.             <div class=\"widget-main no-padding\">
  713.                 {% block formulario %}
  714.                 {% endblock formulario %}
  715.             </div>
  716.         </div>
  717.     </div>
  718. {% endblock %}
  719. ""@crud\\newedit.html.twig""/data/produccion/integral/src/Crud/templates/newedit.html.twig");
  720.     }
  721. }