<?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;
/* @ui2022/table-filter.html.twig */
class __TwigTemplate_00a4fe436ffcd9974f1409f8ed09b423 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'filter' => [$this, 'block_filter'],
];
}
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", "@ui2022/table-filter.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ui2022/table-filter.html.twig"));
// line 1
$context["form"] = twig_get_attribute($this->env, $this->source, (isset($context["_args"]) || array_key_exists("_args", $context) ? $context["_args"] : (function () { throw new RuntimeError('Variable "_args" does not exist.', 1, $this->source); })()), "form", [], "any", false, false, false, 1);
// line 2
echo "
";
// line 3
$this->env->getRuntime("Symfony\\Component\\Form\\FormRenderer")->setTheme((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 3, $this->source); })()), [0 => "@ui2022/forms/themes/filtering.html.twig"], true);
// line 4
echo "
<div class=\"table__filter\">
";
// line 6
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 6, $this->source); })()), 'form_start', ["action" => ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 7
(isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 7, $this->source); })()), "vars", [], "any", false, false, false, 7), "action", [], "any", false, false, false, 7)) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 7, $this->source); })()), "vars", [], "any", false, false, false, 7), "action", [], "any", false, false, false, 7)) : ($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 7, $this->source); })()), "request", [], "any", false, false, false, 7), "attributes", [], "any", false, false, false, 7), "get", [0 => "_route"], "method", false, false, false, 7), twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 7, $this->source); })()), "request", [], "any", false, false, false, 7), "attributes", [], "any", false, false, false, 7), "get", [0 => "_route_params"], "method", false, false, false, 7))))]);
// line 8
echo "
<div class=\"row align-items-center\">
<div class=\"col-12 col-sm-auto\">
";
// line 11
$this->displayBlock('filter', $context, $blocks);
// line 27
echo " </div>
<div class=\"col-12 col-sm-auto ml-sm-auto\">
";
// line 29
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 29, $this->source); })()), 'rest');
echo "
</div>
</div>
";
// line 32
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 32, $this->source); })()), 'form_end');
echo "
</div>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 11
public function block_filter($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", "filter"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "filter"));
// line 12
echo " ";
if ((twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "filter", [], "any", true, true, false, 12) && twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 12, $this->source); })()), "filter", [], "any", false, false, false, 12))) {
// line 13
echo " ";
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 13, $this->source); })()), "filter", [], "any", false, false, false, 13), 'widget');
echo "
<script type=\"text/javascript\">
(function (window, document, \$, undefined) {
\$(function () {
\$('#";
// line 17
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 17, $this->source); })()), "filter", [], "any", false, false, false, 17), "vars", [], "any", false, false, false, 17), "id", [], "any", false, false, false, 17), "html", null, true);
echo "').on('change', function (e) {
if (\$(e.currentTarget).val()) {
\$('#";
// line 19
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 19, $this->source); })()), "vars", [], "any", false, false, false, 19), "id", [], "any", false, false, false, 19), "html", null, true);
echo "').submit();
}
});
});
})(window, document, jQuery);
</script>
";
}
// line 26
echo " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@ui2022/table-filter.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 124 => 26, 114 => 19, 109 => 17, 101 => 13, 98 => 12, 88 => 11, 75 => 32, 69 => 29, 65 => 27, 63 => 11, 58 => 8, 56 => 7, 55 => 6, 51 => 4, 49 => 3, 46 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("{% set form = _args.form %}
{% form_theme form '@ui2022/forms/themes/filtering.html.twig' %}
<div class=\"table__filter\">
{{ form_start(form, {
action: form.vars.action ?: path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')),
}) }}
<div class=\"row align-items-center\">
<div class=\"col-12 col-sm-auto\">
{% block filter %}
{% if form.filter is defined and form.filter %}
{{ form_widget(form.filter) }}
<script type=\"text/javascript\">
(function (window, document, \$, undefined) {
\$(function () {
\$('#{{ form.filter.vars.id }}').on('change', function (e) {
if (\$(e.currentTarget).val()) {
\$('#{{ form.vars.id }}').submit();
}
});
});
})(window, document, jQuery);
</script>
{% endif %}
{% endblock %}
</div>
<div class=\"col-12 col-sm-auto ml-sm-auto\">
{{ form_rest(form) }}
</div>
</div>
{{ form_end(form) }}
</div>
", "@ui2022/table-filter.html.twig", "/var/www/campussuite/ui2022/table-filter.html.twig");
}
}