<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @crud\newedit.html.twig */
class __TwigTemplate_a0a416e8ea5e9daab6bc9b1862438da7 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'jquery' => [$this, 'block_jquery'],
'url_mapa' => [$this, 'block_url_mapa'],
'check_url_mapa' => [$this, 'block_check_url_mapa'],
'text_bad_url_mapa' => [$this, 'block_text_bad_url_mapa'],
'url_mapaPunto' => [$this, 'block_url_mapaPunto'],
'check_url_mapaPunto' => [$this, 'block_check_url_mapaPunto'],
'text_bad_url_mapaPunto' => [$this, 'block_text_bad_url_mapaPunto'],
'crud' => [$this, 'block_crud'],
'formulario' => [$this, 'block_formulario'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@crud\\crud.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@crud\\newedit.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@crud\\newedit.html.twig"));
$this->parent = $this->loadTemplate("@crud\\crud.html.twig", "@crud\\newedit.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_jquery($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "jquery"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "jquery"));
// line 4
echo " ";
$this->displayParentBlock("jquery", $context, $blocks);
echo "
<script type=\"text/javascript\">
\$(function()
{
\$('.hide_item_";
// line 9
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", null, true);
echo "').click(function(e){
e.preventDefault();
if (confirm(\"";
// line 11
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("delete.confirm", [], "crud"), "html", null, true);
echo "\"))
{
var id=\$(this).attr(\"item_id\");
var adjunto='hidefile_";
// line 14
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", null, true);
echo "_'+id;
var control='file_";
// line 15
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", null, true);
echo "_'+id;
adjunto=document.getElementById(adjunto);
\$(adjunto).addClass(\"hide\");
control=document.getElementById(control);
\$(control).removeClass(\"hide\");
\$(control).parents('form').change();
}
});
\$('.just_numbers').keypress(function(e){
if (e.which<48 || e.which>57 )
e.preventDefault();
});
var cargainicial";
// line 29
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", null, true);
echo " = true;
\$( \"#dialog-mapa-";
// line 30
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", null, true);
echo "\" ).dialog({
autoOpen: false,
height: 610,
width: 750,
modal: true,
resizable: false,
title_html: true,
title: '<div id=\"texto\" class=\"widget-header widget-header-small\"><h4 class=\"smaller red\"><i class=\"fas fa-globe\"></i> Definir Ubicación en Mapa</h4></div>',
buttons: {
Cancelar: function() {
\$( \"#dialog-mapa-";
// line 41
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", null, true);
echo "\" ).dialog( \"close\" );
}
}
});
\$( \"#dialog-relacion-";
// line 46
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", null, true);
echo "\" ).dialog({
autoOpen: false,
height: 500,
width: 800,
modal: true,
resizable: false,
title_html: true,
title: '<div id=\"texto\" class=\"widget-header widget-header-small\"><h4 class=\"smaller red\"><i class=\"fas fa-globe\"></i> Definir nuevo elemento</h4></div>',
beforeClose: function(){
\$('#dialog_";
// line 55
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", null, true);
echo "' ).parent().removeClass(\"hide\");
},
open: function(){
\$('#dialog_";
// line 58
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", null, true);
echo "' ).parent().addClass(\"hide\");
},
buttons: {
Grabar: function() {
var routeClassName = \$('#relacionnombre-";
// line 62
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", null, true);
echo "').val();
var form = \$('#crud_form_'+routeClassName);
if (\$(form).find('.wrong_email').length>0)
{
alert('Correo electrónico incorrecto');
return false;
}
\$( \"#dialog-relacion-";
// line 69
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", null, true);
echo "\" ).parent().mask(\" Grabando...\");
\$(form).ajaxSubmit({
type: form.attr('method'),
url: form.attr('action'),
dataType: 'json',
data: { _xml_http_request: true },
success: function(data) {
if (data.ok)
{
var id_nuevo=data.id;
var combo = \$('#relaciontarget-";
// line 79
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", null, true);
echo "').val();
\$('#'+combo+' option:selected').removeProp('selected');
\$('#'+combo).append('<option selected=\"true\" value=\"'+data.id+'\">'+data.txt+'</option>')
\$( \"#dialog-relacion-";
// line 82
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", null, true);
echo "\" ).parent().unmask();
\$( \"#dialog-relacion-";
// line 83
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", null, true);
echo "\" ).dialog( \"close\" );
/* var routeClassName = \$('#'+combo).attr('relation');
var baseSite = \$('#baseSite').val();
var url = baseSite + \"all/items/\"+routeClassName+\"/\"+id_nuevo;
\$('#'+combo).load(url, function(){
\$( \"#dialog-relacion-";
// line 89
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", null, true);
echo "\" ).parent().unmask();
\$( \"#dialog-relacion-";
// line 90
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", null, true);
echo "\" ).dialog( \"close\" );
});*/
}
else
{
\$( \"#dialog-relacion-";
// line 95
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", null, true);
echo "\" ).parent().unmask();
showError(bootbox,data.error);
}
}
})
},
Cancelar: function() {
\$( \"#dialog-relacion-";
// line 103
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", null, true);
echo "\" ).dialog( \"close\" );
}
}
});
\$(\".botonmapa\").click(function(e){
e.preventDefault();
var baseSite = \$('#baseSite').val();
var idcampo = \$(this).attr('itemid');
var tipoDibujo = \$(this).attr('geom');
var urlOk = true;
";
// line 114
$this->displayBlock('url_mapa', $context, $blocks);
// line 119
echo " ";
$this->displayBlock('check_url_mapa', $context, $blocks);
// line 121
echo " if (urlOk)
{
\$(\"#dialog-mapa-";
// line 123
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", null, true);
echo "\").dialog(\"open\");
if (cargainicial";
// line 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.', 124, $this->source); })()), "html", null, true);
echo ")
{
\$('#dialog-mapa-";
// line 126
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", null, true);
echo "').load(url);
cargainicial";
// line 127
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", null, true);
echo " = false;
}
}
else
alert('";
// line 131
$this->displayBlock('text_bad_url_mapa', $context, $blocks);
echo "');
});
\$(\".botonmapaPunto\").click(function(e){
e.preventDefault();
var baseSite = \$('#baseSite').val();
var idcampo = \$(this).attr('itemid');
var tipoDibujo = \$(this).attr('geom');
var urlOk = true;
";
// line 140
$this->displayBlock('url_mapaPunto', $context, $blocks);
// line 145
echo " ";
$this->displayBlock('check_url_mapaPunto', $context, $blocks);
// line 161
echo "
});
\$('[data-rel=tooltip]').tooltip({container:'body'});
\$('[data-rel=popover]').popover({container:'body'});
// \$('[data-rel=\"tooltip\"]').tooltip();
\$(\".dual-list\").each(function () {
var lista = \$(this).bootstrapDualListbox({infoTextFiltered: '<span class=\"label label-purple label-lg\">";
// line 169
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("opciones.filtrado", [], "crud"), "html", null, true);
echo "</span>'});
var container1 = lista.bootstrapDualListbox('getContainer');
container1.find('.btn').addClass('btn-white btn-info btn-bold');
container1.find('.box1').prepend('<div style=\"text-align: center\">";
// line 172
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("opciones.disponibles", [], "crud"), "html", null, true);
echo "</div>');
container1.find('.box2').prepend('<div style=\"text-align: center\">";
// line 173
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("opciones.seleccionados", [], "crud"), "html", null, true);
echo "</div>');
});
\$('.chosen-select.chosen-pending').chosen({allow_single_deselect:true});
\$('.chosen-select.chosen-pending').removeClass('chosen-pending');
\$('.email').change(function(e){
var filter = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9_\\.\\-])+\\.)+([a-zA-Z0-9]{2,4})+\$/;
var email = \$(this).val();
if (!filter.test(email))
{
\$(this).css('color', 'red');
\$(this).focus();
\$(this).addClass('wrong_email');
}
else
{
\$(this).css('color', 'black');
\$(this).removeClass('wrong_email');
}
});
\$('#crud_form_";
// line 196
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", null, true);
echo "').submit(function(e){
if (\$(this).find('.wrong_email').length>0)
{
alert('Correo electrónico incorrecto');
e.preventDefault();
}
});
});
\t
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 114
public function block_url_mapa($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "url_mapa"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "url_mapa"));
// line 115
echo " var url = \"";
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", null, true);
echo "\";
url =url.replace('__TIPO__', tipoDibujo);
url =url.replace('__CAMPO__', idcampo);
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 119
public function block_check_url_mapa($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "check_url_mapa"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "check_url_mapa"));
// line 120
echo " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 131
public function block_text_bad_url_mapa($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "text_bad_url_mapa"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "text_bad_url_mapa"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 140
public function block_url_mapaPunto($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "url_mapaPunto"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "url_mapaPunto"));
// line 141
echo " var url = \"";
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", null, true);
echo "\";
url =url.replace('__TIPO__', tipoDibujo);
url =url.replace('__CAMPO__', idcampo);
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 145
public function block_check_url_mapaPunto($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "check_url_mapaPunto"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "check_url_mapaPunto"));
// line 146
echo "
if (urlOk)
{
\$(\"#dialog-mapa-";
// line 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.', 149, $this->source); })()), "html", null, true);
echo "\").parent().mask('Mostrando ubicación, espere....');
\$(\"#dialog-mapa-";
// line 151
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", null, true);
echo "\").dialog(\"open\");
if(cargainicial";
// line 152
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", null, true);
echo "){
\$('#dialog-mapa-";
// line 153
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", null, true);
echo "').load(url);
cargainicial";
// line 154
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", null, true);
echo " = false;
}
}
else
alert('";
// line 158
$this->displayBlock('text_bad_url_mapaPunto', $context, $blocks);
echo "');
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function block_text_bad_url_mapaPunto($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "text_bad_url_mapaPunto"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "text_bad_url_mapaPunto"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 210
public function block_crud($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "crud"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "crud"));
// line 211
echo " <div class=\"widget-box transparent\">
";
// line 226
echo "
<div class=\"widget-body\" style=\"display: block;\">
<div class=\"widget-main no-padding\">
";
// line 229
$this->displayBlock('formulario', $context, $blocks);
// line 231
echo " </div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 229
public function block_formulario($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "formulario"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "formulario"));
// line 230
echo " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@crud\\newedit.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% extends \"@crud\\\\crud.html.twig\" %}
{% block jquery %}
{{ parent() }}
<script type=\"text/javascript\">
\$(function()
{
\$('.hide_item_{{ routeClassName }}').click(function(e){
e.preventDefault();
if (confirm(\"{{ 'delete.confirm' | trans({}, 'crud') }}\"))
{
var id=\$(this).attr(\"item_id\");
var adjunto='hidefile_{{ routeClassName }}_'+id;
var control='file_{{ routeClassName }}_'+id;
adjunto=document.getElementById(adjunto);
\$(adjunto).addClass(\"hide\");
control=document.getElementById(control);
\$(control).removeClass(\"hide\");
\$(control).parents('form').change();
}
});
\$('.just_numbers').keypress(function(e){
if (e.which<48 || e.which>57 )
e.preventDefault();
});
var cargainicial{{ routeClassName }} = true;
\$( \"#dialog-mapa-{{ routeClassName }}\" ).dialog({
autoOpen: false,
height: 610,
width: 750,
modal: true,
resizable: false,
title_html: true,
title: '<div id=\"texto\" class=\"widget-header widget-header-small\"><h4 class=\"smaller red\"><i class=\"fas fa-globe\"></i> Definir Ubicación en Mapa</h4></div>',
buttons: {
Cancelar: function() {
\$( \"#dialog-mapa-{{ routeClassName }}\" ).dialog( \"close\" );
}
}
});
\$( \"#dialog-relacion-{{ routeClassName }}\" ).dialog({
autoOpen: false,
height: 500,
width: 800,
modal: true,
resizable: false,
title_html: true,
title: '<div id=\"texto\" class=\"widget-header widget-header-small\"><h4 class=\"smaller red\"><i class=\"fas fa-globe\"></i> Definir nuevo elemento</h4></div>',
beforeClose: function(){
\$('#dialog_{{ routeClassName }}' ).parent().removeClass(\"hide\");
},
open: function(){
\$('#dialog_{{ routeClassName }}' ).parent().addClass(\"hide\");
},
buttons: {
Grabar: function() {
var routeClassName = \$('#relacionnombre-{{ routeClassName }}').val();
var form = \$('#crud_form_'+routeClassName);
if (\$(form).find('.wrong_email').length>0)
{
alert('Correo electrónico incorrecto');
return false;
}
\$( \"#dialog-relacion-{{ routeClassName }}\" ).parent().mask(\" Grabando...\");
\$(form).ajaxSubmit({
type: form.attr('method'),
url: form.attr('action'),
dataType: 'json',
data: { _xml_http_request: true },
success: function(data) {
if (data.ok)
{
var id_nuevo=data.id;
var combo = \$('#relaciontarget-{{ routeClassName }}').val();
\$('#'+combo+' option:selected').removeProp('selected');
\$('#'+combo).append('<option selected=\"true\" value=\"'+data.id+'\">'+data.txt+'</option>')
\$( \"#dialog-relacion-{{ routeClassName }}\" ).parent().unmask();
\$( \"#dialog-relacion-{{ routeClassName }}\" ).dialog( \"close\" );
/* var routeClassName = \$('#'+combo).attr('relation');
var baseSite = \$('#baseSite').val();
var url = baseSite + \"all/items/\"+routeClassName+\"/\"+id_nuevo;
\$('#'+combo).load(url, function(){
\$( \"#dialog-relacion-{{ routeClassName }}\" ).parent().unmask();
\$( \"#dialog-relacion-{{ routeClassName }}\" ).dialog( \"close\" );
});*/
}
else
{
\$( \"#dialog-relacion-{{ routeClassName }}\" ).parent().unmask();
showError(bootbox,data.error);
}
}
})
},
Cancelar: function() {
\$( \"#dialog-relacion-{{ routeClassName }}\" ).dialog( \"close\" );
}
}
});
\$(\".botonmapa\").click(function(e){
e.preventDefault();
var baseSite = \$('#baseSite').val();
var idcampo = \$(this).attr('itemid');
var tipoDibujo = \$(this).attr('geom');
var urlOk = true;
{% block url_mapa %}
var url = \"{{ path('dibujarGeometria', {'tipoDibujo': '__TIPO__', 'idCampo': '__CAMPO__', 'idContenedorMapa': 'dialog-mapa-'~routeClassName}) }}\";
url =url.replace('__TIPO__', tipoDibujo);
url =url.replace('__CAMPO__', idcampo);
{% endblock url_mapa %}
{% block check_url_mapa %}
{% endblock check_url_mapa %}
if (urlOk)
{
\$(\"#dialog-mapa-{{ routeClassName }}\").dialog(\"open\");
if (cargainicial{{ routeClassName }})
{
\$('#dialog-mapa-{{ routeClassName }}').load(url);
cargainicial{{ routeClassName }} = false;
}
}
else
alert('{% block text_bad_url_mapa %}{% endblock text_bad_url_mapa %}');
});
\$(\".botonmapaPunto\").click(function(e){
e.preventDefault();
var baseSite = \$('#baseSite').val();
var idcampo = \$(this).attr('itemid');
var tipoDibujo = \$(this).attr('geom');
var urlOk = true;
{% block url_mapaPunto %}
var url = \"{{ path('dibujarPunto', {'tipoDibujo': '__TIPO__', 'idCampo': '__CAMPO__', 'idContenedorMapa': 'dialog-mapa-'~routeClassName}) }}\";
url =url.replace('__TIPO__', tipoDibujo);
url =url.replace('__CAMPO__', idcampo);
{% endblock url_mapaPunto %}
{% block check_url_mapaPunto %}
if (urlOk)
{
\$(\"#dialog-mapa-{{ routeClassName }}\").parent().mask('Mostrando ubicación, espere....');
\$(\"#dialog-mapa-{{ routeClassName }}\").dialog(\"open\");
if(cargainicial{{ routeClassName }}){
\$('#dialog-mapa-{{ routeClassName }}').load(url);
cargainicial{{ routeClassName }} = false;
}
}
else
alert('{% block text_bad_url_mapaPunto %}{% endblock text_bad_url_mapaPunto %}');
{% endblock check_url_mapaPunto %}
});
\$('[data-rel=tooltip]').tooltip({container:'body'});
\$('[data-rel=popover]').popover({container:'body'});
// \$('[data-rel=\"tooltip\"]').tooltip();
\$(\".dual-list\").each(function () {
var lista = \$(this).bootstrapDualListbox({infoTextFiltered: '<span class=\"label label-purple label-lg\">{{ 'opciones.filtrado' | trans({}, 'crud') }}</span>'});
var container1 = lista.bootstrapDualListbox('getContainer');
container1.find('.btn').addClass('btn-white btn-info btn-bold');
container1.find('.box1').prepend('<div style=\"text-align: center\">{{ 'opciones.disponibles' | trans({}, 'crud') }}</div>');
container1.find('.box2').prepend('<div style=\"text-align: center\">{{ 'opciones.seleccionados' | trans({}, 'crud') }}</div>');
});
\$('.chosen-select.chosen-pending').chosen({allow_single_deselect:true});
\$('.chosen-select.chosen-pending').removeClass('chosen-pending');
\$('.email').change(function(e){
var filter = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9_\\.\\-])+\\.)+([a-zA-Z0-9]{2,4})+\$/;
var email = \$(this).val();
if (!filter.test(email))
{
\$(this).css('color', 'red');
\$(this).focus();
\$(this).addClass('wrong_email');
}
else
{
\$(this).css('color', 'black');
\$(this).removeClass('wrong_email');
}
});
\$('#crud_form_{{ routeClassName }}').submit(function(e){
if (\$(this).find('.wrong_email').length>0)
{
alert('Correo electrónico incorrecto');
e.preventDefault();
}
});
});
\t
</script>
{% endblock %}
{% block crud %}
<div class=\"widget-box transparent\">
{#% block ico_heading %}
<div class=\"widget-header widget-header-flat\">
<h4 class=\"widget-title lighter\">
<i class=\"fas fa-pencil-alt orange\"></i>
{% block principal_heading %}
{% endblock %}
</h4>
<!--div class=\"widget-toolbar\">
<a href=\"#\" data-action=\"collapse\">
<i class=\"fas fa-chevron-up\"></i>
</a>
</div-->
</div>
{% endblock %#}
<div class=\"widget-body\" style=\"display: block;\">
<div class=\"widget-main no-padding\">
{% block formulario %}
{% endblock formulario %}
</div>
</div>
</div>
{% endblock %}
", "@crud\\newedit.html.twig", "/data/produccion/integral/src/Crud/templates/newedit.html.twig");
}
}