<?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;

/* tarif/_popup_update_tarif.html.twig */
class __TwigTemplate_8b332bd1f34b13306c7d2db56ec17d1581b8388a091130a61134cebc4d6e4083 extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "tarif/_popup_update_tarif.html.twig"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "tarif/_popup_update_tarif.html.twig"));

        // line 1
        $context["tabPeriode"] = Twig\Extension\CoreExtension::split($this->env->getCharset(), (isset($context["keyperiode"]) || array_key_exists("keyperiode", $context) ? $context["keyperiode"] : (function () { throw new RuntimeError('Variable "keyperiode" does not exist.', 1, $this->source); })()), "/");
        // line 2
        $context["periode"] = ((((CoreExtension::getAttribute($this->env, $this->source, (isset($context["tabPeriode"]) || array_key_exists("tabPeriode", $context) ? $context["tabPeriode"] : (function () { throw new RuntimeError('Variable "tabPeriode" does not exist.', 2, $this->source); })()), 2, [], "array", false, false, false, 2) . "-") . CoreExtension::getAttribute($this->env, $this->source, (isset($context["tabPeriode"]) || array_key_exists("tabPeriode", $context) ? $context["tabPeriode"] : (function () { throw new RuntimeError('Variable "tabPeriode" does not exist.', 2, $this->source); })()), 1, [], "array", false, false, false, 2)) . "-") . CoreExtension::getAttribute($this->env, $this->source, (isset($context["tabPeriode"]) || array_key_exists("tabPeriode", $context) ? $context["tabPeriode"] : (function () { throw new RuntimeError('Variable "tabPeriode" does not exist.', 2, $this->source); })()), 0, [], "array", false, false, false, 2));
        // line 3
        yield "<div id=\"popup-update-periode-";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 3, $this->source); })()), "html", null, true);
        yield "-";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["loop"]) || array_key_exists("loop", $context) ? $context["loop"] : (function () { throw new RuntimeError('Variable "loop" does not exist.', 3, $this->source); })()), "index", [], "any", false, false, false, 3), "html", null, true);
        yield "\" style=\"display:none\" >
    <div class=\"p-3\">
        <form  style=\"font-size: 1rem;\" action=\"";
        // line 5
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("update_tarif_periode_type", ["type" => (isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 5, $this->source); })())]), "html", null, true);
        yield "\"  method=\"post\"  enctype=\"multipart/form-data\" multipart=\"true\" data-file=\"\" data-turbo=\"false\">
            <div class=\"form-group mb-2\">
                <label for=\"dateDebutUpdate-";
        // line 7
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 7, $this->source); })()), "html", null, true);
        yield "\" class=\"col-form-label\" style=\"font-weight: 600\">Date de début</label>
                <input type=\"date\" class=\"form-control-sm mx-2\" name=\"date_debut\" id=\"dateDebutUpdate-";
        // line 8
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 8, $this->source); })()), "html", null, true);
        yield "\" class=\"me-2\"  value=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["periode"]) || array_key_exists("periode", $context) ? $context["periode"] : (function () { throw new RuntimeError('Variable "periode" does not exist.', 8, $this->source); })()), "html", null, true);
        yield "\"required min=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate($this->extensions['Twig\Extension\CoreExtension']->modifyDate("now", "+1 day"), "Y-m-d"), "html", null, true);
        yield "\">
                <i style=\"font-size: 0.9rem;\">La date de fin de cette période sera automatiquement calculée lors du prochain ajout de période</i>
            </div>
            <div class=\"my-3 text-center\">
                <label for=\"formFileUpdate-";
        // line 12
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 12, $this->source); })()), "html", null, true);
        yield "\" class=\"btn btn-success form-label FormFile\" style=\"color:white !important;\">Importer un nouveau fichier tarif
                    <i class=\" ml-2 fa fa-paperclip\" aria-hidden=\"true\"></i>
                </label>
                <input class=\"form-control\" type=\"file\" id=\"formFileUpdate-";
        // line 15
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 15, $this->source); })()), "html", null, true);
        yield "\" placeholder=\"Importer un fichier tarif\" name=\"fichier_tarif\"  hidden required accept=\".csv\">
                <span class=\"file-chosen\" style=\"font-style: italic;\"></span>
            </div>
            <input type=\"hidden\" name=\"old_date\" value=\"";
        // line 18
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["periode"]) || array_key_exists("periode", $context) ? $context["periode"] : (function () { throw new RuntimeError('Variable "periode" does not exist.', 18, $this->source); })()), "html", null, true);
        yield "\">

            <p class=\"my-4\" style=\"font-size: 1rem\">Le fichier attendu doit être au format .csv et contenir les colonnes suivantes (avec un séparateur « ; ») :</p>
            <ul style=\"font-size: 1rem\">
                ";
        // line 22
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["tab"]) || array_key_exists("tab", $context) ? $context["tab"] : (function () { throw new RuntimeError('Variable "tab" does not exist.', 22, $this->source); })()), "fieldsFile", [], "any", false, false, false, 22));
        foreach ($context['_seq'] as $context["_key"] => $context["field"]) {
            // line 23
            yield "                    <li>";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["field"], "html", null, true);
            yield "</li>
                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 25
        yield "            </ul>

            <div class=\"form-group d-flex justify-content-center mt-4\">
                <div class=\"form-actions-row\">
                    <button  class=\"btn btn-danger btn-close-popup\"  data-dxpopup-id=\"popup-update-periode-";
        // line 29
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 29, $this->source); })()), "html", null, true);
        yield "-";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["loop"]) || array_key_exists("loop", $context) ? $context["loop"] : (function () { throw new RuntimeError('Variable "loop" does not exist.', 29, $this->source); })()), "index", [], "any", false, false, false, 29), "html", null, true);
        yield "\" type=\"button\" >Annuler</button>
                    <button   class=\"btn btn-success me-3 \" type=\"submit\">Valider</button>
                </div>
            </div>
        </form>

    </div>
</div>";
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "tarif/_popup_update_tarif.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable()
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  114 => 29,  108 => 25,  99 => 23,  95 => 22,  88 => 18,  82 => 15,  76 => 12,  65 => 8,  61 => 7,  56 => 5,  48 => 3,  46 => 2,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% set tabPeriode = keyperiode|split('/')%}
{% set periode = tabPeriode[2] ~ '-' ~ tabPeriode[1] ~ '-' ~ tabPeriode[0] %}
<div id=\"popup-update-periode-{{ type }}-{{ loop.index }}\" style=\"display:none\" >
    <div class=\"p-3\">
        <form  style=\"font-size: 1rem;\" action=\"{{ path('update_tarif_periode_type', {type: type}) }}\"  method=\"post\"  enctype=\"multipart/form-data\" multipart=\"true\" data-file=\"\" data-turbo=\"false\">
            <div class=\"form-group mb-2\">
                <label for=\"dateDebutUpdate-{{ type }}\" class=\"col-form-label\" style=\"font-weight: 600\">Date de début</label>
                <input type=\"date\" class=\"form-control-sm mx-2\" name=\"date_debut\" id=\"dateDebutUpdate-{{ type }}\" class=\"me-2\"  value=\"{{ periode }}\"required min=\"{{\"now\"|date_modify(\"+1 day\")|date(\"Y-m-d\")  }}\">
                <i style=\"font-size: 0.9rem;\">La date de fin de cette période sera automatiquement calculée lors du prochain ajout de période</i>
            </div>
            <div class=\"my-3 text-center\">
                <label for=\"formFileUpdate-{{ type }}\" class=\"btn btn-success form-label FormFile\" style=\"color:white !important;\">Importer un nouveau fichier tarif
                    <i class=\" ml-2 fa fa-paperclip\" aria-hidden=\"true\"></i>
                </label>
                <input class=\"form-control\" type=\"file\" id=\"formFileUpdate-{{ type }}\" placeholder=\"Importer un fichier tarif\" name=\"fichier_tarif\"  hidden required accept=\".csv\">
                <span class=\"file-chosen\" style=\"font-style: italic;\"></span>
            </div>
            <input type=\"hidden\" name=\"old_date\" value=\"{{ periode }}\">

            <p class=\"my-4\" style=\"font-size: 1rem\">Le fichier attendu doit être au format .csv et contenir les colonnes suivantes (avec un séparateur « ; ») :</p>
            <ul style=\"font-size: 1rem\">
                {% for field in tab.fieldsFile %}
                    <li>{{ field }}</li>
                {% endfor %}
            </ul>

            <div class=\"form-group d-flex justify-content-center mt-4\">
                <div class=\"form-actions-row\">
                    <button  class=\"btn btn-danger btn-close-popup\"  data-dxpopup-id=\"popup-update-periode-{{ type }}-{{ loop.index }}\" type=\"button\" >Annuler</button>
                    <button   class=\"btn btn-success me-3 \" type=\"submit\">Valider</button>
                </div>
            </div>
        </form>

    </div>
</div>", "tarif/_popup_update_tarif.html.twig", "/builds/dev/refonte_sav/templates/tarif/_popup_update_tarif.html.twig");
    }
}
