<?php

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

/* AppBundle:User:login.html.twig */
class __TwigTemplate_5d99c4bfb16845b680e55009b0216dfd7b669e149ae54a00091fa1bbd941d9b3 extends \Twig\Template
{
    public function __construct(Environment $env)
    {
        parent::__construct($env);

        // line 8
        $this->parent = $this->loadTemplate("@App/Layouts/layout.html.twig", "AppBundle:User:login.html.twig", 8);
        $this->blocks = [
            'content' => [$this, 'block_content'],
            'javascripts' => [$this, 'block_javascripts'],
        ];
    }

    protected function doGetParent(array $context)
    {
        return "@App/Layouts/layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "AppBundle:User:login.html.twig"));

        $this->parent->display($context, array_merge($this->blocks, $blocks));
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 9
    public function block_content($context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));

        // line 10
        echo "    <div class=\"col-lg-4 box-form\">
        <h2>Identificarse</h2>
        <hr/>

        ";
        // line 14
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : $this->getContext($context, "app")), "session", []), "flashbag", []), "get", [0 => "logout"], "method"));
        foreach ($context['_seq'] as $context["_key"] => $context["flash_message"]) {
            // line 15
            echo "            <div class=\"mt20 container abso col-lg-12 col-md-12 col-sm-12 col-xs-12\">
                <div class=\"rows text-center\">
                    <div class=\"h alert alert-danger alert-dismissible\">
                        <h4>";
            // line 18
            echo twig_escape_filter($this->env, $context["flash_message"], "html", null, true);
            echo "</h4>
                    </div>
                </div>
            </div>
        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['flash_message'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 23
        echo "
        ";
        // line 24
        if ($this->env->getExtension('Symfony\Bridge\Twig\Extension\SecurityExtension')->isGranted("ROLE_USER")) {
            // line 25
            echo "            ";
            echo twig_escape_filter($this->env, twig_var_dump($this->env, $context, [0 => $this->getAttribute((isset($context["app"]) ? $context["app"] : $this->getContext($context, "app")), "user", [])]), "html", null, true);
            echo "
        ";
        }
        // line 27
        echo "        ";
        if (((isset($context["error"]) ? $context["error"] : $this->getContext($context, "error")) != "")) {
            // line 28
            echo "            ";
            if (((isset($context["last_username"]) ? $context["last_username"] : $this->getContext($context, "last_username")) != "")) {
                // line 29
                echo "            <div class=\"alert alert-danger\" role=\"alert\">
                El usuario <b>";
                // line 30
                echo twig_escape_filter($this->env, (isset($context["last_username"]) ? $context["last_username"] : $this->getContext($context, "last_username")), "html", null, true);
                echo "</b> o la Contraseña no coincide con nuestros registros.<br>Intenta de nuevo.
            </div>
            ";
            } else {
                // line 33
                echo "            <div class=\"alert alert-danger\" role=\"alert\">
                El <b>Usuario</b> o la <b>Contraseña</b> no coincide con nuestros registros.<br>Intenta de nuevo.
            </div>
            ";
            }
            // line 37
            echo "        ";
        }
        // line 38
        echo "        ";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : $this->getContext($context, "app")), "session", []), "flashbag", [], "method"), "get", [0 => "danger"], "method"));
        foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
            // line 39
            echo "            <div class=\"alert alert-danger\">";
            echo twig_escape_filter($this->env, $context["message"], "html", null, true);
            echo "</div>
        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 41
        echo "        <form action=\"";
        echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\RoutingExtension')->getPath("login_check");
        echo "\" method=\"POST\">
            <label>Email</label>
            <input type=\"email\" id=\"username\" name=\"_username\" value=\"";
        // line 43
        echo twig_escape_filter($this->env, (isset($context["last_username"]) ? $context["last_username"] : $this->getContext($context, "last_username")), "html", null, true);
        echo "\" class=\"form-control\" />
            <label>Contraseña</label>
            <input type=\"password\" id=\"password\" name=\"_password\" class=\"form-control\" />
            <input type=\"submit\" value=\"Entrar\" class=\"btn btn-success\" />
            <input type=\"hidden\" name=\"_target_path\" value=\"/home\">
        </form>
    </div>
";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 52
    public function block_javascripts($context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));

        // line 53
        echo "    ";
        $this->displayParentBlock("javascripts", $context, $blocks);
        echo "
    <script type=\"text/javascript\">
        \$( document ).ready(function() {
            \$('#username').focus();
        });
    </script>
";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    public function getTemplateName()
    {
        return "AppBundle:User:login.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  154 => 53,  148 => 52,  133 => 43,  127 => 41,  118 => 39,  113 => 38,  110 => 37,  104 => 33,  98 => 30,  95 => 29,  92 => 28,  89 => 27,  83 => 25,  81 => 24,  78 => 23,  67 => 18,  62 => 15,  58 => 14,  52 => 10,  46 => 9,  22 => 8,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Source("{#
# Created by PhpStorm.
# User: @jdperea59
# PC: gerencia-ti
# Date: 16/04/18
# Time: 11:23 AM
#}
{% extends \"@App/Layouts/layout.html.twig\" %}
{% block content %}
    <div class=\"col-lg-4 box-form\">
        <h2>Identificarse</h2>
        <hr/>

        {% for flash_message in app.session.flashbag.get('logout') %}
            <div class=\"mt20 container abso col-lg-12 col-md-12 col-sm-12 col-xs-12\">
                <div class=\"rows text-center\">
                    <div class=\"h alert alert-danger alert-dismissible\">
                        <h4>{{ flash_message }}</h4>
                    </div>
                </div>
            </div>
        {% endfor %}

        {%   if is_granted('ROLE_USER') %}
            {{ dump(app.user) }}
        {% endif %}
        {% if error != \"\" %}
            {% if last_username != \"\" %}
            <div class=\"alert alert-danger\" role=\"alert\">
                El usuario <b>{{ last_username }}</b> o la Contraseña no coincide con nuestros registros.<br>Intenta de nuevo.
            </div>
            {% else %}
            <div class=\"alert alert-danger\" role=\"alert\">
                El <b>Usuario</b> o la <b>Contraseña</b> no coincide con nuestros registros.<br>Intenta de nuevo.
            </div>
            {% endif %}
        {% endif %}
        {% for message in app.session.flashbag().get('danger') %}
            <div class=\"alert alert-danger\">{{ message }}</div>
        {% endfor %}
        <form action=\"{{ path('login_check') }}\" method=\"POST\">
            <label>Email</label>
            <input type=\"email\" id=\"username\" name=\"_username\" value=\"{{ last_username }}\" class=\"form-control\" />
            <label>Contraseña</label>
            <input type=\"password\" id=\"password\" name=\"_password\" class=\"form-control\" />
            <input type=\"submit\" value=\"Entrar\" class=\"btn btn-success\" />
            <input type=\"hidden\" name=\"_target_path\" value=\"/home\">
        </form>
    </div>
{% endblock %}

{% block javascripts %}
    {{parent()}}
    <script type=\"text/javascript\">
        \$( document ).ready(function() {
            \$('#username').focus();
        });
    </script>
{% endblock %}", "AppBundle:User:login.html.twig", "/home/colmoda/public_html/CMDA/src/AppBundle/Resources/views/User/login.html.twig");
    }
}
