768752318193597c21159cc9ea38529a9ec030ca57790790173c0f0c5c8814c5.php 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <?php
  2. /* forms/fields/key/key.html.twig */
  3. class __TwigTemplate_a2a6fb1f2429748017817298c2e8e31fa7b2909fd807acc7b4770106482dd78b extends Twig_Template
  4. {
  5. public function __construct(Twig_Environment $env)
  6. {
  7. parent::__construct($env);
  8. // line 1
  9. $this->parent = $this->loadTemplate("forms/field.html.twig", "forms/fields/key/key.html.twig", 1);
  10. $this->blocks = array(
  11. 'input' => array($this, 'block_input'),
  12. 'input_attributes' => array($this, 'block_input_attributes'),
  13. );
  14. }
  15. protected function doGetParent(array $context)
  16. {
  17. return "forms/field.html.twig";
  18. }
  19. protected function doDisplay(array $context, array $blocks = array())
  20. {
  21. $this->parent->display($context, array_merge($this->blocks, $blocks));
  22. }
  23. // line 3
  24. public function block_input($context, array $blocks = array())
  25. {
  26. // line 4
  27. echo " <div class=\"form-input-wrapper ";
  28. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "size", array()), "html", null, true);
  29. echo "\">
  30. <input
  31. type=\"text\"
  32. value=\"";
  33. // line 7
  34. echo twig_escape_filter($this->env, twig_join_filter(twig_escape_filter($this->env, ($context["value"] ?? null), "html_attr"), ", "), "html", null, true);
  35. echo "\"
  36. data-key-observe=\"";
  37. // line 8
  38. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Common\Twig\TwigExtension')->fieldNameFilter((($context["scope"] ?? null) . $this->getAttribute(($context["field"] ?? null), "name", array()))), "html", null, true);
  39. echo "\"
  40. ";
  41. // line 9
  42. $this->displayBlock('input_attributes', $context, $blocks);
  43. // line 24
  44. echo " />
  45. </div>
  46. ";
  47. }
  48. // line 9
  49. public function block_input_attributes($context, array $blocks = array())
  50. {
  51. // line 10
  52. echo " ";
  53. if ($this->getAttribute(($context["field"] ?? null), "classes", array(), "any", true, true)) {
  54. echo "class=\"";
  55. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "classes", array()), "html", null, true);
  56. echo "\" ";
  57. }
  58. // line 11
  59. echo " ";
  60. if ($this->getAttribute(($context["field"] ?? null), "id", array(), "any", true, true)) {
  61. echo "id=\"";
  62. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "id", array()));
  63. echo "\" ";
  64. }
  65. // line 12
  66. echo " ";
  67. if ($this->getAttribute(($context["field"] ?? null), "style", array(), "any", true, true)) {
  68. echo "style=\"";
  69. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "style", array()));
  70. echo "\" ";
  71. }
  72. // line 13
  73. echo " ";
  74. if (($this->getAttribute(($context["field"] ?? null), "disabled", array()) || ($context["isDisabledToggleable"] ?? null))) {
  75. echo "disabled=\"disabled\"";
  76. }
  77. // line 14
  78. echo " ";
  79. if ($this->getAttribute(($context["field"] ?? null), "placeholder", array())) {
  80. echo "placeholder=\"";
  81. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "placeholder", array()), "html", null, true);
  82. echo "\"";
  83. }
  84. // line 15
  85. echo " ";
  86. if (twig_in_filter($this->getAttribute(($context["field"] ?? null), "autofocus", array()), array(0 => "on", 1 => "true", 2 => 1))) {
  87. echo "autofocus=\"autofocus\"";
  88. }
  89. // line 16
  90. echo " ";
  91. if (twig_in_filter($this->getAttribute(($context["field"] ?? null), "novalidate", array()), array(0 => "on", 1 => "true", 2 => 1))) {
  92. echo "novalidate=\"novalidate\"";
  93. }
  94. // line 17
  95. echo " ";
  96. if (twig_in_filter($this->getAttribute(($context["field"] ?? null), "readonly", array()), array(0 => "on", 1 => "true", 2 => 1))) {
  97. echo "readonly=\"readonly\"";
  98. }
  99. // line 18
  100. echo " ";
  101. if (twig_in_filter($this->getAttribute(($context["field"] ?? null), "autocomplete", array()), array(0 => "on", 1 => "off"))) {
  102. echo "autocomplete=\"";
  103. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "autocomplete", array()), "html", null, true);
  104. echo "\"";
  105. }
  106. // line 19
  107. echo " ";
  108. if (twig_in_filter($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "required", array()), array(0 => "on", 1 => "true", 2 => 1))) {
  109. echo "required=\"required\"";
  110. }
  111. // line 20
  112. echo " ";
  113. if ($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "pattern", array())) {
  114. echo "pattern=\"";
  115. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "pattern", array()), "html", null, true);
  116. echo "\"";
  117. }
  118. // line 21
  119. echo " ";
  120. if ($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "message", array())) {
  121. echo "title=\"";
  122. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Common\Twig\TwigExtension')->translate(twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "message", array()))), "html", null, true);
  123. echo "\"
  124. ";
  125. } elseif ($this->getAttribute( // line 22
  126. ($context["field"] ?? null), "title", array(), "any", true, true)) {
  127. echo "title=\"";
  128. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Common\Twig\TwigExtension')->translate(twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "title", array()))), "html", null, true);
  129. echo "\" ";
  130. }
  131. // line 23
  132. echo " ";
  133. }
  134. public function getTemplateName()
  135. {
  136. return "forms/fields/key/key.html.twig";
  137. }
  138. public function isTraitable()
  139. {
  140. return false;
  141. }
  142. public function getDebugInfo()
  143. {
  144. return array ( 138 => 23, 132 => 22, 125 => 21, 118 => 20, 113 => 19, 106 => 18, 101 => 17, 96 => 16, 91 => 15, 84 => 14, 79 => 13, 72 => 12, 65 => 11, 58 => 10, 55 => 9, 49 => 24, 47 => 9, 43 => 8, 39 => 7, 32 => 4, 29 => 3, 11 => 1,);
  145. }
  146. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  147. public function getSource()
  148. {
  149. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  150. return $this->getSourceContext()->getCode();
  151. }
  152. public function getSourceContext()
  153. {
  154. return new Twig_Source("{% extends \"forms/field.html.twig\" %}
  155. {% block input %}
  156. <div class=\"form-input-wrapper {{ field.size }}\">
  157. <input
  158. type=\"text\"
  159. value=\"{{ value|e('html_attr')|join(', ') }}\"
  160. data-key-observe=\"{{ (scope ~ field.name)|fieldName }}\"
  161. {% block input_attributes %}
  162. {% if field.classes is defined %}class=\"{{ field.classes }}\" {% endif %}
  163. {% if field.id is defined %}id=\"{{ field.id|e }}\" {% endif %}
  164. {% if field.style is defined %}style=\"{{ field.style|e }}\" {% endif %}
  165. {% if field.disabled or isDisabledToggleable %}disabled=\"disabled\"{% endif %}
  166. {% if field.placeholder %}placeholder=\"{{ field.placeholder }}\"{% endif %}
  167. {% if field.autofocus in ['on', 'true', 1] %}autofocus=\"autofocus\"{% endif %}
  168. {% if field.novalidate in ['on', 'true', 1] %}novalidate=\"novalidate\"{% endif %}
  169. {% if field.readonly in ['on', 'true', 1] %}readonly=\"readonly\"{% endif %}
  170. {% if field.autocomplete in ['on', 'off'] %}autocomplete=\"{{ field.autocomplete }}\"{% endif %}
  171. {% if field.validate.required in ['on', 'true', 1] %}required=\"required\"{% endif %}
  172. {% if field.validate.pattern %}pattern=\"{{ field.validate.pattern }}\"{% endif %}
  173. {% if field.validate.message %}title=\"{{ field.validate.message|e|t }}\"
  174. {% elseif field.title is defined %}title=\"{{ field.title|e|t }}\" {% endif %}
  175. {% endblock %}
  176. />
  177. </div>
  178. {% endblock %}", "forms/fields/key/key.html.twig", "/home/kevin/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/forms/fields/key/key.html.twig");
  179. }
  180. }