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

/* rapport/publicationpta.html.twig */
class __TwigTemplate_8e6723d488f0478d939713b36cb6886b 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->blocks = [
            'page_title' => [$this, 'block_page_title'],
            'page_content' => [$this, 'block_page_content'],
            'javascripts' => [$this, 'block_javascripts'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 1
        return "@AdminLTE/layout/cfgodd-layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->load("@AdminLTE/layout/cfgodd-layout.html.twig", 1);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        yield "Publication du rapport de la sensibilité du PTA
\t";
        // line 4
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "session", [], "any", false, false, false, 4), "get", ["_year"], "method", false, false, false, 4), "html", null, true);
        yield "
";
        yield from [];
    }

    // line 8
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 9
        yield "    ";
        if ((null === ($context["year"] ?? null))) {
            // line 10
            yield "        <div class=\"row\">
\t\t<div class=\"col-xl-12 col-sm-12 col-12 mb-4\">
\t\t\t<div class=\"alert alert-danger\">
\t\t\t\tVeuillez vous assurer que cette année est bien créée. 
\t\t\t</div>
\t\t</div>
\t</div>

    ";
        } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source,         // line 18
($context["year"] ?? null), "publierpta", [], "any", false, false, false, 18)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 19
            yield "        <div class=\"row\">
\t\t<div class=\"col-xl-12 col-sm-12 col-12 mb-4\">
\t\t\t<div class=\"alert alert-success\">
\t\t\t\tVous avez déjà publier la sensibilté du PTA pour l'année ";
            // line 22
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["year"] ?? null), "name", [], "any", false, false, false, 22), "html", null, true);
            yield ". 
\t\t\t</div>
\t\t</div>
\t</div>
    ";
        } else {
            // line 27
            yield "\t<div class=\"row\">
\t\t<div class=\"col-xl-12 col-sm-12 col-12 mb-4\">
\t\t\t<div class=\"alert alert-danger\">
\t\t\t\tVous êtes sur le point de publier la sensibilité des PTA de
\t\t\t\t";
            // line 31
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["year"] ?? null), "name", [], "any", false, false, false, 31), "html", null, true);
            yield ". Une fois les données publiées pour l'année
\t\t\t\t";
            // line 32
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["year"] ?? null), "name", [], "any", false, false, false, 32), "html", null, true);
            yield ", elles seront
\t\t\t\tseront visibles par le grand public et vous ne serez plus en mesure de les modifier. Assurez vous de bien vouloir publier les données.
\t\t\t</div>
\t\t</div>
\t</div>
\t";
            // line 37
            yield from $this->load("rapport/publicationpta.html.twig", 37, "974980377")->unwrap()->yield($context);
            // line 58
            yield "    ";
        }
        yield from [];
    }

    // line 61
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_javascripts(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 62
        yield "\t<script src=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/sweetalert2@11.js"), "html", null, true);
        yield "\"></script>
\t<script>
\t\t\$(document).on('click', \"form.publier button\", function (e) {
\t\tvar _this = \$(this);
\t\te.preventDefault();

\t\tconst swalWithBootstrapButtons = Swal.mixin({
\t\tcustomClass: {
\t\tconfirmButton: 'btn btn-success',
\t\tcancelButton: 'btn btn-danger'
\t\t},
\t\tbuttonsStyling: false
\t\t})

\t\tswalWithBootstrapButtons.fire({
\t\ttitle: \"Etes-vous sûr de vouloir publier la sensibilité du PTA de ";
        // line 77
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "session", [], "any", false, false, false, 77), "get", ["_year"], "method", false, false, false, 77), "html", null, true);
        yield " ?\",
\t\ttext: \"\",
\t\ticon: 'error',
\t\tshowCancelButton: true,
\t\tfocusConfirm: false,
\t\tconfirmButtonClass: \"mb-2 mr-2 btn-hover-shine btn btn-success float-right\",
\t\tcancelButtonClass: \"mb-2 mr-2 btn-hover-shine btn btn-danger float-left\",
\t\tconfirmButtonText: 'Publier',
\t\tcancelButtonText: 'Annuler',
\t\treverseButtons: true
\t\t}).then(function (e) {
\t\te.value && _this.closest(\"form\").submit();
\t\t})


\t\t});
\t</script>
";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  156 => 77,  137 => 62,  130 => 61,  124 => 58,  122 => 37,  114 => 32,  110 => 31,  104 => 27,  96 => 22,  91 => 19,  89 => 18,  79 => 10,  76 => 9,  69 => 8,  62 => 4,  53 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "rapport/publicationpta.html.twig", "/var/www/html/templates/rapport/publicationpta.html.twig");
    }
}


/* rapport/publicationpta.html.twig */
class __TwigTemplate_8e6723d488f0478d939713b36cb6886b___974980377 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->blocks = [
            'box_body' => [$this, 'block_box_body'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 37
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->load("@AdminLTE/Widgets/box-widget.html.twig", 37);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 38
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 39
        yield "\t\t\t<form method=\"POST\" action=";
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_publierpta_post");
        yield " role=\"form\" accept-charset=\"UTF-8\" enctype=\"multipart/form-data\" class=\"publier\">
\t\t\t\t<div class=\"form-group\">
\t\t\t\t\t<label for=\"recipient-name\" class=\"col-form-label\">Rapport sensibilité PTA
\t\t\t\t\t\t";
        // line 42
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["year"] ?? null), "name", [], "any", false, false, false, 42), "html", null, true);
        yield "</label>
\t\t\t\t\t<input type=\"file\" class=\"form-control\" name=\"pta\" accept=\"application/pdf\"/>
\t\t\t\t</div>

\t\t\t\t<div class=\"form-group row\">
\t\t\t\t\t<div class=\"col-sm-2\">
\t\t\t\t\t\t<a href=\"";
        // line 48
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_suiodd_dashboard");
        yield "\" class=\"btn btn-block btn-default\">";
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.cancel", [], "messages");
        yield "</a>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"col-sm-offset-2 col-sm-10\">
\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-block btn-primary\" name=\"publier\" value=\"publier\">Publier</button>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</form>
\t\t";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  266 => 48,  257 => 42,  250 => 39,  243 => 38,  232 => 37,  156 => 77,  137 => 62,  130 => 61,  124 => 58,  122 => 37,  114 => 32,  110 => 31,  104 => 27,  96 => 22,  91 => 19,  89 => 18,  79 => 10,  76 => 9,  69 => 8,  62 => 4,  53 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "rapport/publicationpta.html.twig", "/var/www/html/templates/rapport/publicationpta.html.twig");
    }
}
