8c51dcd48e6989f2981bdb0e3013b3f8aa577a010cdff5b0a848ebee1c4fb777.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <?php
  2. /* login.html.twig */
  3. class __TwigTemplate_31a5220dc52086498ad3c55b8de8ecbb39f98539caf1dd351e857e2cc92192e9 extends Twig_Template
  4. {
  5. public function __construct(Twig_Environment $env)
  6. {
  7. parent::__construct($env);
  8. $this->parent = false;
  9. $this->blocks = array(
  10. );
  11. }
  12. protected function doDisplay(array $context, array $blocks = array())
  13. {
  14. // line 1
  15. $this->loadTemplate("login.html.twig", "login.html.twig", 1, "1539425397")->display(array_merge($context, array("title" => "Grav Admin Login")));
  16. }
  17. public function getTemplateName()
  18. {
  19. return "login.html.twig";
  20. }
  21. public function isTraitable()
  22. {
  23. return false;
  24. }
  25. public function getDebugInfo()
  26. {
  27. return array ( 19 => 1,);
  28. }
  29. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  30. public function getSource()
  31. {
  32. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  33. return $this->getSourceContext()->getCode();
  34. }
  35. public function getSourceContext()
  36. {
  37. return new Twig_Source("{% embed 'partials/login.html.twig' with {title:'Grav Admin Login'} %}
  38. {% block form %}
  39. {% if grav.user.username and grav.user.authenticated %}
  40. <div class=\"form-actions primary-accent\">
  41. <button type=\"submit\" class=\"button primary\" name=\"task\" value=\"logout\"><i class=\"fa fa-sign-in\"></i> {{ 'PLUGIN_ADMIN.LOGOUT'|tu }}</button>
  42. </div>
  43. {% else %}
  44. {% for field in form.fields %}
  45. {% if field.type %}
  46. <div>
  47. {% include [\"forms/fields/#{field.type}/#{field.type}.html.twig\", 'forms/fields/text/text.html.twig'] %}
  48. </div>
  49. {% endif %}
  50. {% endfor %}
  51. <div class=\"form-actions primary-accent\">
  52. {% if notAuthorized %}
  53. <a class=\"button secondary\" onclick=\"window.history.back()\"><i class=\"fa fa-reply\"></i> {{ 'PLUGIN_ADMIN.BACK'|tu }}</a>
  54. <button type=\"submit\" class=\"button primary\" name=\"task\" value=\"logout\"><i class=\"fa fa-sign-in\"></i> {{ 'PLUGIN_ADMIN.LOGOUT'|tu }}</button>
  55. {% else %}
  56. {% if not authenticated %}
  57. <a class=\"button secondary\" href=\"{{ base_url_relative }}/forgot\"><i class=\"fa fa-exclamation-circle\"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN_FORGOT'|tu }}</a>
  58. <button type=\"submit\" class=\"button primary\" name=\"task\" value=\"login\"><i class=\"fa fa-sign-in\"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN'|tu }}</button>
  59. {% else %}
  60. <button type=\"submit\" class=\"button primary\" name=\"task\" value=\"logout\"><i class=\"fa fa-sign-in\"></i> {{ 'PLUGIN_ADMIN.LOGOUT'|tu }}</button>
  61. {% endif %}
  62. {% endif %}
  63. </div>
  64. <script>
  65. \$(document).ready( function() {
  66. \$('#messages').delay(5000).animate({ height: 'toggle', opacity: 'toggle' }, 'slow');
  67. });
  68. </script>
  69. {% endif %}
  70. {% endblock %}
  71. {% endembed %}
  72. ", "login.html.twig", "/mnt/data/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/login.html.twig");
  73. }
  74. }
  75. /* login.html.twig */
  76. class __TwigTemplate_31a5220dc52086498ad3c55b8de8ecbb39f98539caf1dd351e857e2cc92192e9_1539425397 extends Twig_Template
  77. {
  78. public function __construct(Twig_Environment $env)
  79. {
  80. parent::__construct($env);
  81. $this->parent = $this->loadTemplate("partials/login.html.twig", "login.html.twig", 1);
  82. $this->blocks = array(
  83. 'form' => array($this, 'block_form'),
  84. );
  85. }
  86. protected function doGetParent(array $context)
  87. {
  88. return "partials/login.html.twig";
  89. }
  90. protected function doDisplay(array $context, array $blocks = array())
  91. {
  92. $this->parent->display($context, array_merge($this->blocks, $blocks));
  93. }
  94. // line 3
  95. public function block_form($context, array $blocks = array())
  96. {
  97. // line 4
  98. echo "
  99. ";
  100. // line 5
  101. if (($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "user", array()), "username", array()) && $this->getAttribute($this->getAttribute(($context["grav"] ?? null), "user", array()), "authenticated", array()))) {
  102. // line 6
  103. echo "
  104. <div class=\"form-actions primary-accent\">
  105. <button type=\"submit\" class=\"button primary\" name=\"task\" value=\"logout\"><i class=\"fa fa-sign-in\"></i> ";
  106. // line 8
  107. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.LOGOUT"), "html", null, true);
  108. echo "</button>
  109. </div>
  110. ";
  111. } else {
  112. // line 12
  113. echo " ";
  114. $context['_parent'] = $context;
  115. $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["form"] ?? null), "fields", array()));
  116. $context['loop'] = array(
  117. 'parent' => $context['_parent'],
  118. 'index0' => 0,
  119. 'index' => 1,
  120. 'first' => true,
  121. );
  122. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
  123. $length = count($context['_seq']);
  124. $context['loop']['revindex0'] = $length - 1;
  125. $context['loop']['revindex'] = $length;
  126. $context['loop']['length'] = $length;
  127. $context['loop']['last'] = 1 === $length;
  128. }
  129. foreach ($context['_seq'] as $context["_key"] => $context["field"]) {
  130. // line 13
  131. echo " ";
  132. if ($this->getAttribute($context["field"], "type", array())) {
  133. // line 14
  134. echo " <div>
  135. ";
  136. // line 15
  137. $this->loadTemplate(array(0 => (((("forms/fields/" . $this->getAttribute($context["field"], "type", array())) . "/") . $this->getAttribute($context["field"], "type", array())) . ".html.twig"), 1 => "forms/fields/text/text.html.twig"), "login.html.twig", 15)->display($context);
  138. // line 16
  139. echo " </div>
  140. ";
  141. }
  142. // line 18
  143. echo " ";
  144. ++$context['loop']['index0'];
  145. ++$context['loop']['index'];
  146. $context['loop']['first'] = false;
  147. if (isset($context['loop']['length'])) {
  148. --$context['loop']['revindex0'];
  149. --$context['loop']['revindex'];
  150. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  151. }
  152. }
  153. $_parent = $context['_parent'];
  154. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
  155. $context = array_intersect_key($context, $_parent) + $_parent;
  156. // line 19
  157. echo "
  158. <div class=\"form-actions primary-accent\">
  159. ";
  160. // line 21
  161. if (($context["notAuthorized"] ?? null)) {
  162. // line 22
  163. echo " <a class=\"button secondary\" onclick=\"window.history.back()\"><i class=\"fa fa-reply\"></i> ";
  164. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK"), "html", null, true);
  165. echo "</a>
  166. <button type=\"submit\" class=\"button primary\" name=\"task\" value=\"logout\"><i class=\"fa fa-sign-in\"></i> ";
  167. // line 23
  168. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.LOGOUT"), "html", null, true);
  169. echo "</button>
  170. ";
  171. } else {
  172. // line 25
  173. echo " ";
  174. if ( !($context["authenticated"] ?? null)) {
  175. // line 26
  176. echo " <a class=\"button secondary\" href=\"";
  177. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  178. echo "/forgot\"><i class=\"fa fa-exclamation-circle\"></i> ";
  179. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.LOGIN_BTN_FORGOT"), "html", null, true);
  180. echo "</a>
  181. <button type=\"submit\" class=\"button primary\" name=\"task\" value=\"login\"><i class=\"fa fa-sign-in\"></i> ";
  182. // line 27
  183. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.LOGIN_BTN"), "html", null, true);
  184. echo "</button>
  185. ";
  186. } else {
  187. // line 29
  188. echo " <button type=\"submit\" class=\"button primary\" name=\"task\" value=\"logout\"><i class=\"fa fa-sign-in\"></i> ";
  189. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.LOGOUT"), "html", null, true);
  190. echo "</button>
  191. ";
  192. }
  193. // line 31
  194. echo " ";
  195. }
  196. // line 32
  197. echo " </div>
  198. <script>
  199. \$(document).ready( function() {
  200. \$('#messages').delay(5000).animate({ height: 'toggle', opacity: 'toggle' }, 'slow');
  201. });
  202. </script>
  203. ";
  204. }
  205. // line 41
  206. echo "
  207. ";
  208. }
  209. public function getTemplateName()
  210. {
  211. return "login.html.twig";
  212. }
  213. public function isTraitable()
  214. {
  215. return false;
  216. }
  217. public function getDebugInfo()
  218. {
  219. return array ( 234 => 41, 223 => 32, 220 => 31, 214 => 29, 209 => 27, 202 => 26, 199 => 25, 194 => 23, 189 => 22, 187 => 21, 183 => 19, 169 => 18, 165 => 16, 163 => 15, 160 => 14, 157 => 13, 139 => 12, 132 => 8, 128 => 6, 126 => 5, 123 => 4, 120 => 3, 19 => 1,);
  220. }
  221. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  222. public function getSource()
  223. {
  224. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  225. return $this->getSourceContext()->getCode();
  226. }
  227. public function getSourceContext()
  228. {
  229. return new Twig_Source("{% embed 'partials/login.html.twig' with {title:'Grav Admin Login'} %}
  230. {% block form %}
  231. {% if grav.user.username and grav.user.authenticated %}
  232. <div class=\"form-actions primary-accent\">
  233. <button type=\"submit\" class=\"button primary\" name=\"task\" value=\"logout\"><i class=\"fa fa-sign-in\"></i> {{ 'PLUGIN_ADMIN.LOGOUT'|tu }}</button>
  234. </div>
  235. {% else %}
  236. {% for field in form.fields %}
  237. {% if field.type %}
  238. <div>
  239. {% include [\"forms/fields/#{field.type}/#{field.type}.html.twig\", 'forms/fields/text/text.html.twig'] %}
  240. </div>
  241. {% endif %}
  242. {% endfor %}
  243. <div class=\"form-actions primary-accent\">
  244. {% if notAuthorized %}
  245. <a class=\"button secondary\" onclick=\"window.history.back()\"><i class=\"fa fa-reply\"></i> {{ 'PLUGIN_ADMIN.BACK'|tu }}</a>
  246. <button type=\"submit\" class=\"button primary\" name=\"task\" value=\"logout\"><i class=\"fa fa-sign-in\"></i> {{ 'PLUGIN_ADMIN.LOGOUT'|tu }}</button>
  247. {% else %}
  248. {% if not authenticated %}
  249. <a class=\"button secondary\" href=\"{{ base_url_relative }}/forgot\"><i class=\"fa fa-exclamation-circle\"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN_FORGOT'|tu }}</a>
  250. <button type=\"submit\" class=\"button primary\" name=\"task\" value=\"login\"><i class=\"fa fa-sign-in\"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN'|tu }}</button>
  251. {% else %}
  252. <button type=\"submit\" class=\"button primary\" name=\"task\" value=\"logout\"><i class=\"fa fa-sign-in\"></i> {{ 'PLUGIN_ADMIN.LOGOUT'|tu }}</button>
  253. {% endif %}
  254. {% endif %}
  255. </div>
  256. <script>
  257. \$(document).ready( function() {
  258. \$('#messages').delay(5000).animate({ height: 'toggle', opacity: 'toggle' }, 'slow');
  259. });
  260. </script>
  261. {% endif %}
  262. {% endblock %}
  263. {% endembed %}
  264. ", "login.html.twig", "/mnt/data/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/login.html.twig");
  265. }
  266. }