var/cache/dev/twig/3a/3ab60ca0d1597a6af471db951244eb72.php line 55

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Sandbox\SecurityNotAllowedTestError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. use Twig\TemplateWrapper;
  16. /* security/login.html.twig */
  17. class __TwigTemplate_f45ea33617d7f4abe55bef6dde86ae22 extends Template
  18. {
  19. private Source $source;
  20. /**
  21. * @var array<string, Template>
  22. */
  23. private array $macros = [];
  24. public function __construct(Environment $env)
  25. {
  26. parent::__construct($env);
  27. $this->source = $this->getSourceContext();
  28. $this->blocks = [
  29. 'title' => [$this, 'block_title'],
  30. 'body' => [$this, 'block_body'],
  31. ];
  32. }
  33. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  34. {
  35. // line 1
  36. return "base.html.twig";
  37. }
  38. protected function doDisplay(array $context, array $blocks = []): iterable
  39. {
  40. $macros = $this->macros;
  41. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  42. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "security/login.html.twig"));
  43. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  44. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "security/login.html.twig"));
  45. $this->parent = $this->load("base.html.twig", 1);
  46. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  47. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49. }
  50. // line 3
  51. /**
  52. * @return iterable<null|scalar|\Stringable>
  53. */
  54. public function block_title(array $context, array $blocks = []): iterable
  55. {
  56. $macros = $this->macros;
  57. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  58. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  59. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  60. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  61. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Log in!", [], "messages");
  62. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  63. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  64. yield from [];
  65. }
  66. // line 5
  67. /**
  68. * @return iterable<null|scalar|\Stringable>
  69. */
  70. public function block_body(array $context, array $blocks = []): iterable
  71. {
  72. $macros = $this->macros;
  73. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  74. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  75. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  76. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  77. // line 6
  78. yield "<form method=\"post\">
  79. ";
  80. // line 7
  81. if ((($tmp = (isset($context["error"]) || array_key_exists("error", $context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.', 7, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  82. // line 8
  83. yield " <div class=\"alert alert-danger\">";
  84. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(CoreExtension::getAttribute($this->env, $this->source, (isset($context["error"]) || array_key_exists("error", $context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.', 8, $this->source); })()), "messageKey", [], "any", false, false, false, 8), CoreExtension::getAttribute($this->env, $this->source, (isset($context["error"]) || array_key_exists("error", $context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.', 8, $this->source); })()), "messageData", [], "any", false, false, false, 8), "security"), "html", null, true);
  85. yield "</div>
  86. ";
  87. }
  88. // line 10
  89. yield "
  90. ";
  91. // line 11
  92. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 11, $this->source); })()), "user", [], "any", false, false, false, 11)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  93. // line 12
  94. yield " <div class=\"mb-3\">
  95. ";
  96. // line 13
  97. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("You are logged in as", [], "messages");
  98. yield " ";
  99. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 13, $this->source); })()), "user", [], "any", false, false, false, 13), "username", [], "any", false, false, false, 13), "html", null, true);
  100. yield ", <a href=\"";
  101. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_logout");
  102. yield "\">";
  103. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Logout", [], "messages");
  104. yield "</a>
  105. </div>
  106. ";
  107. }
  108. // line 16
  109. yield "
  110. <h1 class=\"h3 mb-3 font-weight-normal\">";
  111. // line 17
  112. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Please sign in", [], "messages");
  113. yield "</h1>
  114. <label for=\"inputUsername\">";
  115. // line 18
  116. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Username", [], "messages");
  117. yield "</label>
  118. <input type=\"text\" value=\"";
  119. // line 19
  120. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["last_username"]) || array_key_exists("last_username", $context) ? $context["last_username"] : (function () { throw new RuntimeError('Variable "last_username" does not exist.', 19, $this->source); })()), "html", null, true);
  121. yield "\" name=\"username\" id=\"inputUsername\" class=\"form-control\" required autofocus placeholder=\"";
  122. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Enter your username here", [], "messages");
  123. yield "\">
  124. <label for=\"inputPassword\">";
  125. // line 20
  126. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Password", [], "messages");
  127. yield "</label>
  128. <input type=\"password\" name=\"password\" id=\"inputPassword\" class=\"form-control\" required placeholder=\"";
  129. // line 21
  130. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Enter your password here", [], "messages");
  131. yield "\">
  132. <input type=\"hidden\" name=\"_csrf_token\"
  133. value=\"";
  134. // line 24
  135. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderCsrfToken("authenticate"), "html", null, true);
  136. yield "\"
  137. >
  138. ";
  139. // line 37
  140. yield "
  141. <button class=\"btn btn-lg btn-primary\" type=\"submit\">
  142. ";
  143. // line 39
  144. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Sign in", [], "messages");
  145. // line 40
  146. yield " </button>
  147. </form>
  148. ";
  149. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  150. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  151. yield from [];
  152. }
  153. /**
  154. * @codeCoverageIgnore
  155. */
  156. public function getTemplateName(): string
  157. {
  158. return "security/login.html.twig";
  159. }
  160. /**
  161. * @codeCoverageIgnore
  162. */
  163. public function isTraitable(): bool
  164. {
  165. return false;
  166. }
  167. /**
  168. * @codeCoverageIgnore
  169. */
  170. public function getDebugInfo(): array
  171. {
  172. return array ( 171 => 40, 169 => 39, 165 => 37, 159 => 24, 153 => 21, 149 => 20, 143 => 19, 139 => 18, 135 => 17, 132 => 16, 120 => 13, 117 => 12, 115 => 11, 112 => 10, 106 => 8, 104 => 7, 101 => 6, 88 => 5, 65 => 3, 42 => 1,);
  173. }
  174. public function getSourceContext(): Source
  175. {
  176. return new Source("{% extends \x27base.html.twig\x27 %}
  177. {% block title %}{% trans%}Log in!{% endtrans %}{% endblock %}
  178. {% block body %}
  179. <form method=\"post\">
  180. {% if error %}
  181. <div class=\"alert alert-danger\">{{ error.messageKey|trans(error.messageData, \x27security\x27) }}</div>
  182. {% endif %}
  183. {% if app.user %}
  184. <div class=\"mb-3\">
  185. {% trans %}You are logged in as {% endtrans %} {{ app.user.username }}, <a href=\"{{ path(\x27app_logout\x27) }}\">{% trans %}Logout{% endtrans %}</a>
  186. </div>
  187. {% endif %}
  188. <h1 class=\"h3 mb-3 font-weight-normal\">{% trans %}Please sign in{% endtrans %}</h1>
  189. <label for=\"inputUsername\">{% trans %}Username{% endtrans %}</label>
  190. <input type=\"text\" value=\"{{ last_username }}\" name=\"username\" id=\"inputUsername\" class=\"form-control\" required autofocus placeholder=\"{% trans %}Enter your username here{% endtrans %}\">
  191. <label for=\"inputPassword\">{% trans %}Password{% endtrans %}</label>
  192. <input type=\"password\" name=\"password\" id=\"inputPassword\" class=\"form-control\" required placeholder=\"{% trans %}Enter your password here{% endtrans %}\">
  193. <input type=\"hidden\" name=\"_csrf_token\"
  194. value=\"{{ csrf_token(\x27authenticate\x27) }}\"
  195. >
  196. {#
  197. Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
  198. See https://symfony.com/doc/current/security/remember_me.html
  199. <div class=\"checkbox mb-3\">
  200. <label>
  201. <input type=\"checkbox\" name=\"_remember_me\"> Remember me
  202. </label>
  203. </div>
  204. #}
  205. <button class=\"btn btn-lg btn-primary\" type=\"submit\">
  206. {% trans %} Sign in{% endtrans %}
  207. </button>
  208. </form>
  209. {% endblock %}
  210. ", "security/login.html.twig", "/var/www/vhosts/habitechsolutions.cm/birth.habitechsolutions.cm/templates/security/login.html.twig");
  211. }
  212. }