<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;

/* form/notation.html.twig */
class __TwigTemplate_090b3f3fc44ef4f80e5ad1a5d724aae8 extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
            'notation_model_row' => [$this, 'block_notation_model_row'],
        ];
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "form/notation.html.twig"));

        // line 1
        yield from $this->unwrap()->yieldBlock('notation_model_row', $context, $blocks);
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_notation_model_row(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "notation_model_row"));

        // line 2
        yield "
    <tr class=\"notation\" ";
        // line 3
        yield from         $this->unwrap()->yieldBlock("widget_attributes", $context, $blocks);
        yield ">
        <td>
            <div class=\"row mt-2\">
                ";
        // line 6
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 6, $this->source); })()), "targetRate", [], "any", false, false, false, 6), 'widget');
        yield "
                ";
        // line 7
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($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); })()), "locationRate", [], "any", false, false, false, 7), 'widget');
        yield "
                <div class=\"col-2\">";
        // line 8
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 8, $this->source); })()), "nature", [], "any", false, false, false, 8), 'widget', ["attr" => ["onchange" => "calculTargetRate(this.closest(\"tr\").id)"]]);
        yield "</div>
                <div class=\"col-6 p-0\">
                    <div class=\"col-6 float-left\">";
        // line 10
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 10, $this->source); })()), "goal", [], "any", false, false, false, 10), 'widget', ["attr" => ["onchange" => "goalChange(this.closest(\"tr\").id, this.id)"]]);
        yield "</div>
                    <div class=\"col-6 float-right\">";
        // line 11
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 11, $this->source); })()), "target", [], "any", false, false, false, 11), 'widget', ["attr" => ["onchange" => "goalChange(this.closest(\"tr\").id, this.id)"]]);
        yield "</div>
                </div>
                <div class=\"col-3\">";
        // line 13
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($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); })()), "locationType", [], "any", false, false, false, 13), 'widget', ["attr" => ["onchange" => "locationTypeChange(this.closest(\"tr\").id)"]]);
        yield "</div>
                <div class=\"col-1\">
                    ";
        // line 15
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 15, $this->source); })()), "sensitivity", [], "any", false, false, false, 15), 'widget');
        yield "
                    ";
        // line 16
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 16, $this->source); })()), "sensHtml", [], "any", false, false, false, 16), 'widget');
        yield "
                </div>
            </div>

            <div class=\"row mt-2 mb-2\">
                <div class=\"col-2\">";
        // line 21
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["activity"]) || array_key_exists("activity", $context) ? $context["activity"] : (function () { throw new RuntimeError('Variable "activity" does not exist.', 21, $this->source); })()), "html", null, true);
        yield "</div>
                <div class=\"col-6\">";
        // line 22
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 22, $this->source); })()), "indicators", [], "any", false, false, false, 22), 'widget', ["attr" => ["onchange" => "calculTargetRate(this.closest(\"tr\").id, this.id)"]]);
        yield "</div>
                ";
        // line 23
        if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["activity"]) || array_key_exists("activity", $context) ? $context["activity"] : (function () { throw new RuntimeError('Variable "activity" does not exist.', 23, $this->source); })()), "action", [], "any", false, false, false, 23), "programm", [], "any", false, false, false, 23), "ministry", [], "any", false, false, false, 23)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 24
            yield "                    <div class=\"col-3\">
                        <div id=\"";
            // line 25
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 25, $this->source); })()), "communes", [], "any", false, false, false, 25), "vars", [], "any", false, false, false, 25), "id", [], "any", false, false, false, 25), "html", null, true);
            yield "_div\">";
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 25, $this->source); })()), "communes", [], "any", false, false, false, 25), 'widget', ["attr" => ["onchange" => "calculLocationRate(this.closest(\"tr\").id)"]]);
            yield "</div>
                        <div id=\"";
            // line 26
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 26, $this->source); })()), "postes", [], "any", false, false, false, 26), "vars", [], "any", false, false, false, 26), "id", [], "any", false, false, false, 26), "html", null, true);
            yield "_div\">";
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 26, $this->source); })()), "postes", [], "any", false, false, false, 26), 'widget', ["attr" => ["onchange" => "calculLocationRate(this.closest(\"tr\").id)"]]);
            yield "</div>
                    </div>
                ";
        } else {
            // line 29
            yield "                    <div class=\"col-3\">
                        <div id=\"";
            // line 30
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 30, $this->source); })()), "arrondissements", [], "any", false, false, false, 30), "vars", [], "any", false, false, false, 30), "id", [], "any", false, false, false, 30), "html", null, true);
            yield "_div\">";
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 30, $this->source); })()), "arrondissements", [], "any", false, false, false, 30), 'widget', ["attr" => ["onchange" => "calculLocationRate(this.closest(\"tr\").id)"]]);
            yield "</div>
                    </div>
                ";
        }
        // line 33
        yield "                <div class=\"col-1 text-center\">
                ";
        // line 34
        if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD"))) {
            // line 35
            yield "                    ";
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 35, $this->source); })()), "treated", [], "any", false, false, false, 35), 'widget', ["attr" => ["onchange" => "treatedChange(this.closest(\"tr\").id)"]]);
            yield "
                    <br/>
                    <button type=\"submit\" class=\"btn btn-block btn-primary\"><i class=\"fas fa-share-square\"></i></button>
                ";
        }
        // line 39
        yield "                </div>
            </div>
        </td>
    </tr>
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "form/notation.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  162 => 39,  154 => 35,  152 => 34,  149 => 33,  141 => 30,  138 => 29,  130 => 26,  124 => 25,  121 => 24,  119 => 23,  115 => 22,  111 => 21,  103 => 16,  99 => 15,  94 => 13,  89 => 11,  85 => 10,  80 => 8,  76 => 7,  72 => 6,  66 => 3,  63 => 2,  46 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% block notation_model_row %}

    <tr class=\"notation\" {{ block('widget_attributes') }}>
        <td>
            <div class=\"row mt-2\">
                {{ form_widget(form.targetRate) }}
                {{ form_widget(form.locationRate) }}
                <div class=\"col-2\">{{ form_widget(form.nature, {'attr': {'onchange': 'calculTargetRate(this.closest(\"tr\").id)'} }) }}</div>
                <div class=\"col-6 p-0\">
                    <div class=\"col-6 float-left\">{{ form_widget(form.goal, {'attr': {'onchange': 'goalChange(this.closest(\"tr\").id, this.id)'} }) }}</div>
                    <div class=\"col-6 float-right\">{{ form_widget(form.target, {'attr': {'onchange': 'goalChange(this.closest(\"tr\").id, this.id)'} }) }}</div>
                </div>
                <div class=\"col-3\">{{ form_widget(form.locationType, {'attr': {'onchange': 'locationTypeChange(this.closest(\"tr\").id)'} }) }}</div>
                <div class=\"col-1\">
                    {{ form_widget(form.sensitivity) }}
                    {{ form_widget(form.sensHtml) }}
                </div>
            </div>

            <div class=\"row mt-2 mb-2\">
                <div class=\"col-2\">{{ activity }}</div>
                <div class=\"col-6\">{{ form_widget(form.indicators, {'attr': {'onchange': 'calculTargetRate(this.closest(\"tr\").id, this.id)'} }) }}</div>
                {% if activity.action.programm.ministry %}
                    <div class=\"col-3\">
                        <div id=\"{{ form.communes.vars.id }}_div\">{{ form_widget(form.communes, {'attr': {'onchange': 'calculLocationRate(this.closest(\"tr\").id)'} }) }}</div>
                        <div id=\"{{ form.postes.vars.id }}_div\">{{ form_widget(form.postes, {'attr': {'onchange': 'calculLocationRate(this.closest(\"tr\").id)'} }) }}</div>
                    </div>
                {% else %}
                    <div class=\"col-3\">
                        <div id=\"{{ form.arrondissements.vars.id }}_div\">{{ form_widget(form.arrondissements, {'attr': {'onchange': 'calculLocationRate(this.closest(\"tr\").id)'} }) }}</div>
                    </div>
                {% endif %}
                <div class=\"col-1 text-center\">
                {% if (is_granted('ROLE_MANAGER') or is_granted('ROLE_DDD')) %}
                    {{ form_widget(form.treated, {'attr': {'onchange': 'treatedChange(this.closest(\"tr\").id)'} }) }}
                    <br/>
                    <button type=\"submit\" class=\"btn btn-block btn-primary\"><i class=\"fas fa-share-square\"></i></button>
                {% endif %}
                </div>
            </div>
        </td>
    </tr>
{% endblock %}", "form/notation.html.twig", "/var/www/vhosts/sigodd.gouv.bj/httpdocs/templates/form/notation.html.twig");
    }
}
