var/cache/dev/twig/93/93dbbe8c2597fcc377eedab2354a78d4.php line 49

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