36452fe32afb9294dbd59d63d8d2ffb5355ff13b8e22ab7543592527527d54e2.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <?php
  2. /* forms/fields/range/range.html.twig */
  3. class __TwigTemplate_a51cc74a3f950934554e6c0f64c3124d6e5db8b7b3fc076ea33fb1af7a5148f2 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/range/range.html.twig", 1);
  10. $this->blocks = array(
  11. 'input_attributes' => array($this, 'block_input_attributes'),
  12. 'append' => array($this, 'block_append'),
  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_attributes($context, array $blocks = array())
  25. {
  26. // line 4
  27. echo " type=\"range\"
  28. class=\"rangefield ";
  29. // line 5
  30. if ($this->getAttribute(($context["field"] ?? null), "classes", array(), "any", true, true)) {
  31. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "classes", array()), "html", null, true);
  32. echo " ";
  33. }
  34. echo "\"
  35. ";
  36. // line 6
  37. if ($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "min", array())) {
  38. echo "min=\"";
  39. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "min", array()), "html", null, true);
  40. echo "\"";
  41. }
  42. // line 7
  43. echo " ";
  44. if ($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "max", array())) {
  45. echo "max=\"";
  46. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "max", array()), "html", null, true);
  47. echo "\"";
  48. }
  49. // line 8
  50. echo " ";
  51. if ($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "step", array())) {
  52. echo "step=\"";
  53. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "step", array()), "html", null, true);
  54. echo "\"";
  55. }
  56. // line 9
  57. echo " ";
  58. if ($this->getAttribute(($context["field"] ?? null), "id", array(), "any", true, true)) {
  59. // line 10
  60. echo " id=\"range_";
  61. echo twig_escape_filter($this->env, twig_replace_filter(twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "id", array())), ".", "_"), "html", null, true);
  62. echo "\"
  63. oninput=\"number_";
  64. // line 11
  65. echo twig_escape_filter($this->env, twig_replace_filter(twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "id", array())), ".", "_"), "html", null, true);
  66. echo "_output.value = this.value\"
  67. ";
  68. } else {
  69. // line 13
  70. echo " id=\"range_";
  71. echo twig_escape_filter($this->env, twig_replace_filter(twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "name", array())), ".", "_"), "html", null, true);
  72. echo "\"
  73. oninput=\"number_";
  74. // line 14
  75. echo twig_escape_filter($this->env, twig_replace_filter(twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "name", array())), ".", "_"), "html", null, true);
  76. echo "_output.value = this.value\"
  77. ";
  78. }
  79. // line 16
  80. echo " ";
  81. $this->displayParentBlock("input_attributes", $context, $blocks);
  82. echo "
  83. ";
  84. }
  85. // line 18
  86. public function block_append($context, array $blocks = array())
  87. {
  88. // line 19
  89. echo " <input
  90. type=\"number\"
  91. class=\"rangefield ";
  92. // line 21
  93. if ($this->getAttribute(($context["field"] ?? null), "classes", array(), "any", true, true)) {
  94. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "classes", array()), "html", null, true);
  95. echo " ";
  96. }
  97. echo "\"
  98. ";
  99. // line 22
  100. if ($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "min", array())) {
  101. echo "min=\"";
  102. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "min", array()), "html", null, true);
  103. echo "\"";
  104. }
  105. // line 23
  106. echo " ";
  107. if ($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "max", array())) {
  108. echo "max=\"";
  109. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "max", array()), "html", null, true);
  110. echo "\"";
  111. }
  112. // line 24
  113. echo " ";
  114. if ($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "step", array())) {
  115. echo "step=\"";
  116. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "step", array()), "html", null, true);
  117. echo "\"";
  118. }
  119. // line 25
  120. echo " ";
  121. if (($context["value"] ?? null)) {
  122. // line 26
  123. echo " value=\"";
  124. echo twig_escape_filter($this->env, ($context["value"] ?? null), "html", null, true);
  125. echo "\"
  126. ";
  127. } elseif ($this->getAttribute( // line 27
  128. ($context["field"] ?? null), "default", array())) {
  129. // line 28
  130. echo " value=\"";
  131. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "default", array()), "html", null, true);
  132. echo "\"
  133. ";
  134. } else {
  135. // line 30
  136. echo " value=\"0\"
  137. ";
  138. }
  139. // line 32
  140. echo " ";
  141. if ($this->getAttribute(($context["field"] ?? null), "id", array(), "any", true, true)) {
  142. // line 33
  143. echo " id=\"number_";
  144. echo twig_escape_filter($this->env, twig_replace_filter(twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "id", array())), ".", "_"), "html", null, true);
  145. echo "_output\"
  146. oninput=\"range_";
  147. // line 34
  148. echo twig_escape_filter($this->env, twig_replace_filter(twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "id", array())), ".", "_"), "html", null, true);
  149. echo ".value = this.value\"
  150. ";
  151. } else {
  152. // line 36
  153. echo " id=\"number_";
  154. echo twig_escape_filter($this->env, twig_replace_filter(twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "name", array())), ".", "_"), "html", null, true);
  155. echo "_output\"
  156. oninput=\"range_";
  157. // line 37
  158. echo twig_escape_filter($this->env, twig_replace_filter(twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "name", array())), ".", "_"), "html", null, true);
  159. echo ".value = this.value\"
  160. ";
  161. }
  162. // line 39
  163. echo " />
  164. <span class=\"range-append\">";
  165. // line 40
  166. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "append", array()), "html", null, true);
  167. echo "</span>
  168. ";
  169. }
  170. public function getTemplateName()
  171. {
  172. return "forms/fields/range/range.html.twig";
  173. }
  174. public function isTraitable()
  175. {
  176. return false;
  177. }
  178. public function getDebugInfo()
  179. {
  180. return array ( 172 => 40, 169 => 39, 164 => 37, 159 => 36, 154 => 34, 149 => 33, 146 => 32, 142 => 30, 136 => 28, 134 => 27, 129 => 26, 126 => 25, 119 => 24, 112 => 23, 106 => 22, 99 => 21, 95 => 19, 92 => 18, 85 => 16, 80 => 14, 75 => 13, 70 => 11, 65 => 10, 62 => 9, 55 => 8, 48 => 7, 42 => 6, 35 => 5, 32 => 4, 29 => 3, 11 => 1,);
  181. }
  182. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  183. public function getSource()
  184. {
  185. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  186. return $this->getSourceContext()->getCode();
  187. }
  188. public function getSourceContext()
  189. {
  190. return new Twig_Source("{% extends \"forms/field.html.twig\" %}
  191. {% block input_attributes %}
  192. type=\"range\"
  193. class=\"rangefield {% if field.classes is defined %}{{ field.classes }} {% endif %}\"
  194. {% if field.validate.min %}min=\"{{ field.validate.min }}\"{% endif %}
  195. {% if field.validate.max %}max=\"{{ field.validate.max }}\"{% endif %}
  196. {% if field.validate.step %}step=\"{{ field.validate.step }}\"{% endif %}
  197. {% if field.id is defined %}
  198. id=\"range_{{ field.id|e|replace('.', '_') }}\"
  199. oninput=\"number_{{ field.id|e|replace('.', '_') }}_output.value = this.value\"
  200. {% else %}
  201. id=\"range_{{ field.name|e|replace('.', '_') }}\"
  202. oninput=\"number_{{ field.name|e|replace('.', '_') }}_output.value = this.value\"
  203. {% endif %}
  204. {{ parent() }}
  205. {% endblock %}
  206. {% block append %}
  207. <input
  208. type=\"number\"
  209. class=\"rangefield {% if field.classes is defined %}{{ field.classes }} {% endif %}\"
  210. {% if field.validate.min %}min=\"{{ field.validate.min }}\"{% endif %}
  211. {% if field.validate.max %}max=\"{{ field.validate.max }}\"{% endif %}
  212. {% if field.validate.step %}step=\"{{ field.validate.step }}\"{% endif %}
  213. {% if value %}
  214. value=\"{{ value }}\"
  215. {% elseif field.default %}
  216. value=\"{{ field.default }}\"
  217. {% else %}
  218. value=\"0\"
  219. {% endif %}
  220. {% if field.id is defined %}
  221. id=\"number_{{ field.id|e|replace('.', '_') }}_output\"
  222. oninput=\"range_{{ field.id|e|replace('.', '_') }}.value = this.value\"
  223. {% else %}
  224. id=\"number_{{ field.name|e|replace('.', '_') }}_output\"
  225. oninput=\"range_{{ field.name|e|replace('.', '_') }}.value = this.value\"
  226. {% endif %}
  227. />
  228. <span class=\"range-append\">{{ field.append }}</span>
  229. {% endblock append %}
  230. ", "forms/fields/range/range.html.twig", "/mnt/data/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/forms/fields/range/range.html.twig");
  231. }
  232. }