<?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;
/* @SonataAdmin/Form/form_admin_fields.html.twig */
class __TwigTemplate_f40604ed286932de764f3e6a8ac17b9f extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'form_row' => [$this, 'block_form_row'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@!SonataAdmin/Form/form_admin_fields.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", "@SonataAdmin/Form/form_admin_fields.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SonataAdmin/Form/form_admin_fields.html.twig"));
$this->parent = $this->loadTemplate("@!SonataAdmin/Form/form_admin_fields.html.twig", "@SonataAdmin/Form/form_admin_fields.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_form_row($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", "form_row"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "form_row"));
// line 4
echo " ";
$context["show_label"] = (($context["show_label"]) ?? (true));
// line 5
echo " ";
$context["row_id"] = ("sonata-ba-field-container-" . (isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 5, $this->source); })()));
// line 6
echo " ";
$context["row_class"] = twig_trim_filter(((((twig_get_attribute($this->env, $this->source, ($context["row_attr"] ?? null), "class", [], "any", true, true, false, 6)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["row_attr"] ?? null), "class", [], "any", false, false, false, 6), "")) : ("")) . " form-group") . (((twig_length_filter($this->env, (isset($context["errors"]) || array_key_exists("errors", $context) ? $context["errors"] : (function () { throw new RuntimeError('Variable "errors" does not exist.', 6, $this->source); })())) > 0)) ? (" has-error") : (""))));
// line 7
echo " <div";
$__internal_compile_0 = $context;
$__internal_compile_1 = ["attr" => twig_array_merge((isset($context["row_attr"]) || array_key_exists("row_attr", $context) ? $context["row_attr"] : (function () { throw new RuntimeError('Variable "row_attr" does not exist.', 7, $this->source); })()), ["id" => (isset($context["row_id"]) || array_key_exists("row_id", $context) ? $context["row_id"] : (function () { throw new RuntimeError('Variable "row_id" does not exist.', 7, $this->source); })()), "class" => (isset($context["row_class"]) || array_key_exists("row_class", $context) ? $context["row_class"] : (function () { throw new RuntimeError('Variable "row_class" does not exist.', 7, $this->source); })())])];
if (!is_iterable($__internal_compile_1)) {
throw new RuntimeError('Variables passed to the "with" tag must be a hash.', 7, $this->getSourceContext());
}
$__internal_compile_1 = twig_to_array($__internal_compile_1);
$context = $this->env->mergeGlobals(array_merge($context, $__internal_compile_1));
$this->displayBlock("attributes", $context, $blocks);
$context = $__internal_compile_0;
echo " style=\"grid-area: ";
echo twig_escape_filter($this->env, twig_lower_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.', 7, $this->source); })()), "vars", [], "any", false, false, false, 7), "name", [], "any", false, false, false, 7)), "html", null, true);
echo "\">
";
// line 8
$context["div_class"] = "sonata-ba-field";
// line 9
echo "
";
// line 10
if (((isset($context["label"]) || array_key_exists("label", $context) ? $context["label"] : (function () { throw new RuntimeError('Variable "label" does not exist.', 10, $this->source); })()) === false)) {
// line 11
echo " ";
$context["div_class"] = ((isset($context["div_class"]) || array_key_exists("div_class", $context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.', 11, $this->source); })()) . " sonata-collection-row-without-label");
// line 12
echo " ";
}
// line 13
echo "
";
// line 14
if ((array_key_exists("sonata_admin", $context) && (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["sonata_admin"]) || array_key_exists("sonata_admin", $context) ? $context["sonata_admin"] : (function () { throw new RuntimeError('Variable "sonata_admin" does not exist.', 14, $this->source); })()), "options", [], "any", false, false, false, 14), "form_type", [], "array", false, false, false, 14) == "horizontal"))) {
// line 15
echo " ";
// line 16
echo " ";
if ((((isset($context["label"]) || array_key_exists("label", $context) ? $context["label"] : (function () { throw new RuntimeError('Variable "label" does not exist.', 16, $this->source); })()) === false) || twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "vars", [], "any", false, true, false, 16), "checked", [], "any", true, true, false, 16))) {
// line 17
echo " ";
if (twig_in_filter("collection", 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); })()), "parent", [], "any", false, false, false, 17), "vars", [], "any", false, false, false, 17), "block_prefixes", [], "any", false, false, false, 17))) {
// line 18
echo " ";
$context["div_class"] = ((isset($context["div_class"]) || array_key_exists("div_class", $context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.', 18, $this->source); })()) . " col-sm-12");
// line 19
echo " ";
} else {
// line 20
echo " ";
$context["div_class"] = ((isset($context["div_class"]) || array_key_exists("div_class", $context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.', 20, $this->source); })()) . " col-sm-9 col-sm-offset-3");
// line 21
echo " ";
}
// line 22
echo " ";
} else {
// line 23
echo " ";
$context["div_class"] = ((isset($context["div_class"]) || array_key_exists("div_class", $context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.', 23, $this->source); })()) . " col-sm-9");
// line 24
echo " ";
}
// line 25
echo " ";
}
// line 26
echo "
";
// line 27
if ((isset($context["show_label"]) || array_key_exists("show_label", $context) ? $context["show_label"] : (function () { throw new RuntimeError('Variable "show_label" does not exist.', 27, $this->source); })())) {
// line 28
echo " ";
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.', 28, $this->source); })()), 'label', (twig_test_empty($_label_ = ((array_key_exists("label", $context)) ? (_twig_default_filter((isset($context["label"]) || array_key_exists("label", $context) ? $context["label"] : (function () { throw new RuntimeError('Variable "label" does not exist.', 28, $this->source); })()), null)) : (null))) ? [] : ["label" => $_label_]));
echo "
";
}
// line 30
echo "
";
// line 31
if ((array_key_exists("sonata_admin", $context) && (isset($context["sonata_admin_enabled"]) || array_key_exists("sonata_admin_enabled", $context) ? $context["sonata_admin_enabled"] : (function () { throw new RuntimeError('Variable "sonata_admin_enabled" does not exist.', 31, $this->source); })()))) {
// line 32
echo " ";
$context["div_class"] = (((((isset($context["div_class"]) || array_key_exists("div_class", $context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.', 32, $this->source); })()) . " sonata-ba-field-") . twig_get_attribute($this->env, $this->source, (isset($context["sonata_admin"]) || array_key_exists("sonata_admin", $context) ? $context["sonata_admin"] : (function () { throw new RuntimeError('Variable "sonata_admin" does not exist.', 32, $this->source); })()), "edit", [], "any", false, false, false, 32)) . "-") . twig_get_attribute($this->env, $this->source, (isset($context["sonata_admin"]) || array_key_exists("sonata_admin", $context) ? $context["sonata_admin"] : (function () { throw new RuntimeError('Variable "sonata_admin" does not exist.', 32, $this->source); })()), "inline", [], "any", false, false, false, 32));
// line 33
echo " ";
}
// line 34
echo "
";
// line 35
if ((twig_length_filter($this->env, (isset($context["errors"]) || array_key_exists("errors", $context) ? $context["errors"] : (function () { throw new RuntimeError('Variable "errors" does not exist.', 35, $this->source); })())) > 0)) {
// line 36
echo " ";
$context["div_class"] = ((isset($context["div_class"]) || array_key_exists("div_class", $context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.', 36, $this->source); })()) . " sonata-ba-field-error");
// line 37
echo " ";
}
// line 38
echo "
<div class=\"";
// line 39
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["row_attr"] ?? null), "more_info_class", [], "any", true, true, false, 39)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["row_attr"] ?? null), "more_info_class", [], "any", false, false, false, 39), "")) : ("")), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, (isset($context["div_class"]) || array_key_exists("div_class", $context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.', 39, $this->source); })()), "html", null, true);
echo "\">
";
// line 40
if (twig_get_attribute($this->env, $this->source, ($context["row_attr"] ?? null), "more_info_class", [], "any", true, true, false, 40)) {
echo "<span class=\"action-close-more_info fa fa-close\" style=\"float:right;\"></span>";
}
// line 41
echo " ";
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.', 41, $this->source); })()), 'widget', ["horizontal" => false, "horizontal_input_wrapper_class" => ""]);
echo " ";
// line 42
echo "
";
// line 43
if ((twig_length_filter($this->env, (isset($context["errors"]) || array_key_exists("errors", $context) ? $context["errors"] : (function () { throw new RuntimeError('Variable "errors" does not exist.', 43, $this->source); })())) > 0)) {
// line 44
echo " <div class=\"help-block sonata-ba-field-error-messages\">
";
// line 45
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.', 45, $this->source); })()), 'errors');
echo "
</div>
";
}
// line 48
echo "
";
// line 49
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.', 49, $this->source); })()), 'help');
echo "
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "@SonataAdmin/Form/form_admin_fields.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 209 => 49, 206 => 48, 200 => 45, 197 => 44, 195 => 43, 192 => 42, 188 => 41, 184 => 40, 178 => 39, 175 => 38, 172 => 37, 169 => 36, 167 => 35, 164 => 34, 161 => 33, 158 => 32, 156 => 31, 153 => 30, 147 => 28, 145 => 27, 142 => 26, 139 => 25, 136 => 24, 133 => 23, 130 => 22, 127 => 21, 124 => 20, 121 => 19, 118 => 18, 115 => 17, 112 => 16, 110 => 15, 108 => 14, 105 => 13, 102 => 12, 99 => 11, 97 => 10, 94 => 9, 92 => 8, 77 => 7, 74 => 6, 71 => 5, 68 => 4, 58 => 3, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends '@!SonataAdmin/Form/form_admin_fields.html.twig' %}
{% block form_row %}
{% set show_label = show_label ?? true %}
{% set row_id = 'sonata-ba-field-container-'~id %}
{% set row_class = (row_attr.class|default('') ~ ' form-group' ~ (errors|length > 0 ? ' has-error'))|trim %}
<div{% with {attr: row_attr|merge({id: row_id, class: row_class})} %}{{ block('attributes') }}{% endwith %} style=\"grid-area: {{ form.vars.name|lower }}\">
{% set div_class = 'sonata-ba-field' %}
{% if label is same as(false) %}
{% set div_class = div_class ~ ' sonata-collection-row-without-label' %}
{% endif %}
{% if sonata_admin is defined and sonata_admin.options['form_type'] == 'horizontal' %}
{# Add an offset if no label or is a checkbox/radio #}
{% if label is same as(false) or form.vars.checked is defined %}
{% if 'collection' in form.parent.vars.block_prefixes %}
{% set div_class = div_class ~ ' col-sm-12' %}
{% else %}
{% set div_class = div_class ~ ' col-sm-9 col-sm-offset-3' %}
{% endif %}
{% else %}
{% set div_class = div_class ~ ' col-sm-9' %}
{% endif %}
{% endif %}
{% if show_label %}
{{ form_label(form, label|default(null)) }}
{% endif %}
{% if sonata_admin is defined and sonata_admin_enabled %}
{% set div_class = div_class ~ ' sonata-ba-field-' ~ sonata_admin.edit ~ '-' ~ sonata_admin.inline %}
{% endif %}
{% if errors|length > 0 %}
{% set div_class = div_class ~ ' sonata-ba-field-error' %}
{% endif %}
<div class=\"{{ row_attr.more_info_class | default('') }} {{ div_class }}\">
{% if(row_attr.more_info_class is defined) %}<span class=\"action-close-more_info fa fa-close\" style=\"float:right;\"></span>{% endif %}
{{ form_widget(form, {'horizontal': false, 'horizontal_input_wrapper_class': ''}) }} {# {'horizontal': false, 'horizontal_input_wrapper_class': ''} needed to avoid MopaBootstrapBundle messing with the DOM #}
{% if errors|length > 0 %}
<div class=\"help-block sonata-ba-field-error-messages\">
{{ form_errors(form) }}
</div>
{% endif %}
{{ form_help(form) }}
</div>
</div>
{% endblock form_row %}", "@SonataAdmin/Form/form_admin_fields.html.twig", "/var/www/vhosts/perseo.comerziawatches.com/httpdocs/perseo/httpdocs/templates/bundles/SonataAdminBundle/Form/form_admin_fields.html.twig");
}
}