var/cache/dev/twig/5c/5c43f5ab932e7d0b09215b13d4213207.php line 54

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\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* @PimcoreAdmin/Admin/Login/login.html.twig */
  16. class __TwigTemplate_f921af46e3b0fdfe78721004f341d183 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->blocks = [
  28.             'content' => [$this'block_content'],
  29.             'below_footer' => [$this'block_below_footer'],
  30.         ];
  31.     }
  32.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  33.     {
  34.         // line 1
  35.         return "@PimcoreAdmin/Admin/Login/layout.html.twig";
  36.     }
  37.     protected function doDisplay(array $context, array $blocks = []): iterable
  38.     {
  39.         $macros $this->macros;
  40.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  41.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@PimcoreAdmin/Admin/Login/login.html.twig"));
  42.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  43.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@PimcoreAdmin/Admin/Login/login.html.twig"));
  44.         $this->parent $this->load("@PimcoreAdmin/Admin/Login/layout.html.twig"1);
  45.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  46.         
  47.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48.         
  49.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  50.     }
  51.     // line 3
  52.     /**
  53.      * @return iterable<null|scalar|\Stringable>
  54.      */
  55.     public function block_content(array $context, array $blocks = []): iterable
  56.     {
  57.         $macros $this->macros;
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  59.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  61.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  62.         // line 4
  63.         yield "<div id=\"loginform\">
  64.     <form id=\"form-element\" method=\"post\" action=\"";
  65.         // line 5
  66.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pimcore_admin_login_check", ["perspective" => Twig\Extension\CoreExtension::striptags(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'5$this->source); })()), "request", [], "any"falsefalsefalse5), "get", ["perspective"], "method"falsefalsefalse5))]), "html"nulltrue);
  67.         yield "\">
  68.         ";
  69.         // line 7
  70.         if (array_key_exists("error"$context)) {
  71.             // line 8
  72.             yield "        <div class=\"text error\">
  73.             ";
  74.             // line 9
  75.             yield $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((isset($context["error"]) || array_key_exists("error"$context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.'9$this->source); })()), [], "admin");
  76.             yield "
  77.         </div>
  78.         ";
  79.         }
  80.         // line 12
  81.         yield "
  82.         <input type=\"text\" name=\"username\" autocomplete=\"username\" placeholder=\"";
  83.         // line 13
  84.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("username", [], "admin"), "html"nulltrue);
  85.         yield "\" required autofocus>
  86.         <input type=\"password\" name=\"password\" autocomplete=\"current-password\" placeholder=\"";
  87.         // line 14
  88.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("password", [], "admin"), "html"nulltrue);
  89.         yield "\" required>
  90.         <input type=\"hidden\" name=\"csrfToken\" id=\"csrfToken\" value=\"";
  91.         // line 15
  92.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["pimcore_csrf"]) || array_key_exists("pimcore_csrf"$context) ? $context["pimcore_csrf"] : (function () { throw new RuntimeError('Variable "pimcore_csrf" does not exist.'15$this->source); })()), "getCsrfToken", [], "method"falsefalsefalse15), "html"nulltrue);
  93.         yield "\">
  94.         <button type=\"submit\">";
  95.         // line 17
  96.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("login", [], "admin"), "html"nulltrue);
  97.         yield "</button>
  98.     </form>
  99.     <a href=\"";
  100.         // line 20
  101.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pimcore_admin_login_lostpassword");
  102.         yield "\" class=\"lostpassword\">";
  103.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Forgot your password", [], "admin"), "html"nulltrue);
  104.         yield "?</a>
  105. </div>
  106. ";
  107.         // line 23
  108.         if ((($tmp =  !(isset($context["browserSupported"]) || array_key_exists("browserSupported"$context) ? $context["browserSupported"] : (function () { throw new RuntimeError('Variable "browserSupported" does not exist.'23$this->source); })())) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  109.             // line 24
  110.             yield "<div id=\"browserinfo\">
  111.     <div class=\"text\">
  112.         ";
  113.             // line 26
  114.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Your browser is not supported. Please install the latest version of one of the following browsers.", [], "admin"), "html"nulltrue);
  115.             yield "
  116.     </div>
  117.     <div class=\"text browserinfo\">
  118.         <a href=\"https://www.google.com/chrome\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Chrome\"><img src=\"/bundles/pimcoreadmin/img/login/chrome.svg\" alt=\"Chrome\"/></a>
  119.         <a href=\"https://www.mozilla.org/firefox\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Firefox\"><img src=\"/bundles/pimcoreadmin/img/login/firefox.svg\" alt=\"Firefox\"/></a>
  120.         <a href=\"https://www.apple.com/safari\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Safari\"><img src=\"/bundles/pimcoreadmin/img/login/safari.svg\" alt=\"Safari\"/></a>
  121.         <a href=\"https://www.microsoft.com/edge\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Edge\"><img src=\"/bundles/pimcoreadmin/img/login/edge.svg\" alt=\"Edge\"/></a>
  122.     </div>
  123.     <a href=\"#\" onclick=\"showLogin();\">";
  124.             // line 36
  125.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Click here to proceed", [], "admin"), "html"nulltrue);
  126.             yield "</a>
  127. </div>
  128. <script type=\"text/javascript\">
  129.     function showLogin() {
  130.         document.getElementById('loginform').style.display = 'block';
  131.         document.getElementById('browserinfo').style.display = 'none';
  132.     }
  133. </script>
  134. <style type=\"text/css\">
  135.     #loginform {
  136.         display: none;
  137.     }
  138. </style>
  139. ";
  140.         }
  141.         
  142.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  143.         
  144.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  145.         yield from [];
  146.     }
  147.     // line 53
  148.     /**
  149.      * @return iterable<null|scalar|\Stringable>
  150.      */
  151.     public function block_below_footer(array $context, array $blocks = []): iterable
  152.     {
  153.         $macros $this->macros;
  154.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  155.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""below_footer"));
  156.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  157.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""below_footer"));
  158.         // line 54
  159.         yield "<script>
  160.     ";
  161.         // line 55
  162.         if ((($tmp =  !array_key_exists("deeplink"$context)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  163.             // line 56
  164.             yield "    // clear opened tabs store
  165.     localStorage.removeItem(\"pimcore_opentabs\");
  166.     ";
  167.         }
  168.         // line 59
  169.         yield "
  170.     // hide symfony toolbar by default
  171.     var symfonyToolbarKey = 'symfony/profiler/toolbar/displayState';
  172.     if(!window.localStorage.getItem(symfonyToolbarKey)) {
  173.         window.localStorage.setItem(symfonyToolbarKey, 'none');
  174.     }
  175.     // CSRF token refresh
  176.     var formElement = document.getElementById('form-element');
  177.     var csrfRefreshInProgress = false;
  178.     function refreshCsrfToken() {
  179.         csrfRefreshInProgress = true;
  180.         formElement.style.opacity = '0.3';
  181.         var request = new XMLHttpRequest();
  182.         request.open('GET', '";
  183.         // line 74
  184.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pimcore_admin_login_csrf_token");
  185.         yield "');
  186.         request.onload = function () {
  187.             if (this.status >= 200 && this.status < 400) {
  188.                 var res = JSON.parse(this.response);
  189.                 document.getElementById('csrfToken').setAttribute('value', res['csrfToken']);
  190.                 formElement.style.opacity = '1';
  191.                 csrfRefreshInProgress = false;
  192.             }
  193.         };
  194.         request.send();
  195.     }
  196.     document.addEventListener('visibilitychange', function(ev) {
  197.         if(document.visibilityState === 'visible') {
  198.             refreshCsrfToken();
  199.         }
  200.     });
  201.     window.setInterval(refreshCsrfToken, ";
  202.         // line 90
  203.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["csrfTokenRefreshInterval"]) || array_key_exists("csrfTokenRefreshInterval"$context) ? $context["csrfTokenRefreshInterval"] : (function () { throw new RuntimeError('Variable "csrfTokenRefreshInterval" does not exist.'90$this->source); })()), "html"nulltrue);
  204.         yield ");
  205.     formElement.addEventListener(\"submit\", function(evt) {
  206.         if(csrfRefreshInProgress) {
  207.             evt.preventDefault();
  208.         }
  209.     }, true);
  210. </script>
  211. ";
  212.         // line 99
  213.         yield $this->extensions['Pimcore\Twig\Extension\HelpersExtension']->breachAttackRandomContent();
  214.         yield "
  215. ";
  216.         
  217.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  218.         
  219.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  220.         yield from [];
  221.     }
  222.     /**
  223.      * @codeCoverageIgnore
  224.      */
  225.     public function getTemplateName(): string
  226.     {
  227.         return "@PimcoreAdmin/Admin/Login/login.html.twig";
  228.     }
  229.     /**
  230.      * @codeCoverageIgnore
  231.      */
  232.     public function isTraitable(): bool
  233.     {
  234.         return false;
  235.     }
  236.     /**
  237.      * @codeCoverageIgnore
  238.      */
  239.     public function getDebugInfo(): array
  240.     {
  241.         return array (  243 => 99,  231 => 90,  212 => 74,  195 => 59,  190 => 56,  188 => 55,  185 => 54,  172 => 53,  145 => 36,  132 => 26,  128 => 24,  126 => 23,  118 => 20,  112 => 17,  107 => 15,  103 => 14,  99 => 13,  96 => 12,  90 => 9,  87 => 8,  85 => 7,  80 => 5,  77 => 4,  64 => 3,  41 => 1,);
  242.     }
  243.     public function getSourceContext(): Source
  244.     {
  245.         return new Source("{% extends '@PimcoreAdmin/Admin/Login/layout.html.twig' %}
  246. {% block content %}
  247. <div id=\"loginform\">
  248.     <form id=\"form-element\" method=\"post\" action=\"{{ path('pimcore_admin_login_check', {'perspective' : app.request.get('perspective')|striptags}) }}\">
  249.         {% if error is defined %}
  250.         <div class=\"text error\">
  251.             {{ error|trans([],'admin')|raw }}
  252.         </div>
  253.         {% endif %}
  254.         <input type=\"text\" name=\"username\" autocomplete=\"username\" placeholder=\"{{ 'username'|trans([], 'admin') }}\" required autofocus>
  255.         <input type=\"password\" name=\"password\" autocomplete=\"current-password\" placeholder=\"{{ 'password'|trans([], 'admin') }}\" required>
  256.         <input type=\"hidden\" name=\"csrfToken\" id=\"csrfToken\" value=\"{{ pimcore_csrf.getCsrfToken() }}\">
  257.         <button type=\"submit\">{{ 'login'|trans([], 'admin') }}</button>
  258.     </form>
  259.     <a href=\"{{ path('pimcore_admin_login_lostpassword') }}\" class=\"lostpassword\">{{ 'Forgot your password'|trans([], 'admin') }}?</a>
  260. </div>
  261. {% if not browserSupported %}
  262. <div id=\"browserinfo\">
  263.     <div class=\"text\">
  264.         {{ 'Your browser is not supported. Please install the latest version of one of the following browsers.'|trans([], 'admin') }}
  265.     </div>
  266.     <div class=\"text browserinfo\">
  267.         <a href=\"https://www.google.com/chrome\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Chrome\"><img src=\"/bundles/pimcoreadmin/img/login/chrome.svg\" alt=\"Chrome\"/></a>
  268.         <a href=\"https://www.mozilla.org/firefox\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Firefox\"><img src=\"/bundles/pimcoreadmin/img/login/firefox.svg\" alt=\"Firefox\"/></a>
  269.         <a href=\"https://www.apple.com/safari\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Safari\"><img src=\"/bundles/pimcoreadmin/img/login/safari.svg\" alt=\"Safari\"/></a>
  270.         <a href=\"https://www.microsoft.com/edge\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Edge\"><img src=\"/bundles/pimcoreadmin/img/login/edge.svg\" alt=\"Edge\"/></a>
  271.     </div>
  272.     <a href=\"#\" onclick=\"showLogin();\">{{ 'Click here to proceed'|trans([], 'admin') }}</a>
  273. </div>
  274. <script type=\"text/javascript\">
  275.     function showLogin() {
  276.         document.getElementById('loginform').style.display = 'block';
  277.         document.getElementById('browserinfo').style.display = 'none';
  278.     }
  279. </script>
  280. <style type=\"text/css\">
  281.     #loginform {
  282.         display: none;
  283.     }
  284. </style>
  285. {% endif %}
  286. {% endblock %}
  287. {% block below_footer %}
  288. <script>
  289.     {% if deeplink is not defined %}
  290.     // clear opened tabs store
  291.     localStorage.removeItem(\"pimcore_opentabs\");
  292.     {% endif %}
  293.     // hide symfony toolbar by default
  294.     var symfonyToolbarKey = 'symfony/profiler/toolbar/displayState';
  295.     if(!window.localStorage.getItem(symfonyToolbarKey)) {
  296.         window.localStorage.setItem(symfonyToolbarKey, 'none');
  297.     }
  298.     // CSRF token refresh
  299.     var formElement = document.getElementById('form-element');
  300.     var csrfRefreshInProgress = false;
  301.     function refreshCsrfToken() {
  302.         csrfRefreshInProgress = true;
  303.         formElement.style.opacity = '0.3';
  304.         var request = new XMLHttpRequest();
  305.         request.open('GET', '{{ path(\"pimcore_admin_login_csrf_token\") }}');
  306.         request.onload = function () {
  307.             if (this.status >= 200 && this.status < 400) {
  308.                 var res = JSON.parse(this.response);
  309.                 document.getElementById('csrfToken').setAttribute('value', res['csrfToken']);
  310.                 formElement.style.opacity = '1';
  311.                 csrfRefreshInProgress = false;
  312.             }
  313.         };
  314.         request.send();
  315.     }
  316.     document.addEventListener('visibilitychange', function(ev) {
  317.         if(document.visibilityState === 'visible') {
  318.             refreshCsrfToken();
  319.         }
  320.     });
  321.     window.setInterval(refreshCsrfToken, {{ csrfTokenRefreshInterval }});
  322.     formElement.addEventListener(\"submit\", function(evt) {
  323.         if(csrfRefreshInProgress) {
  324.             evt.preventDefault();
  325.         }
  326.     }, true);
  327. </script>
  328. {{ pimcore_breach_attack_random_content() }}
  329. {% endblock %}
  330. ""@PimcoreAdmin/Admin/Login/login.html.twig""/var/www/pim.ampm-world.com/vendor/pimcore/pimcore/bundles/AdminBundle/Resources/views/Admin/Login/login.html.twig");
  331.     }
  332. }