630978b1576372100e8d899f8f548a1b00db4ea04bcb128a6a5a947530291c76.php 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?php
  2. /* forms/fields/dateformat/dateformat.html.twig */
  3. class __TwigTemplate_a2a3fb216e0e775ce03f34374f236d4c1599709c1c929c65a0ac7c46cde5c04e 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/dateformat/dateformat.html.twig", 1);
  10. $this->blocks = array(
  11. 'global_attributes' => array($this, 'block_global_attributes'),
  12. 'input' => array($this, 'block_input'),
  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_global_attributes($context, array $blocks = array())
  25. {
  26. // line 4
  27. echo " data-grav-selectize=\"";
  28. echo twig_escape_filter($this->env, twig_jsonencode_filter((($this->getAttribute(($context["field"] ?? null), "selectize", array(), "any", true, true)) ? ($this->getAttribute(($context["field"] ?? null), "selectize", array())) : (array()))), "html_attr");
  29. echo "\"
  30. data-grav-field=\"select\"
  31. ";
  32. // line 6
  33. $this->displayParentBlock("global_attributes", $context, $blocks);
  34. echo "
  35. ";
  36. }
  37. // line 9
  38. public function block_input($context, array $blocks = array())
  39. {
  40. // line 10
  41. echo " <div class=\"form-select-wrapper ";
  42. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "size", array()), "html", null, true);
  43. echo "\">
  44. <select class=\"";
  45. // line 11
  46. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "classes", array()), "html", null, true);
  47. echo "\" name=\"";
  48. echo twig_escape_filter($this->env, ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->fieldNameFilter((($context["scope"] ?? null) . $this->getAttribute(($context["field"] ?? null), "name", array()))) . (($this->getAttribute(($context["field"] ?? null), "multiple", array())) ? ("[]") : (""))), "html", null, true);
  49. echo "\"
  50. ";
  51. // line 12
  52. if (twig_in_filter($this->getAttribute(($context["field"] ?? null), "autofocus", array()), array(0 => "on", 1 => "true", 2 => 1))) {
  53. echo "autofocus=\"autofocus\"";
  54. }
  55. // line 13
  56. echo " ";
  57. if (twig_in_filter($this->getAttribute(($context["field"] ?? null), "novalidate", array()), array(0 => "on", 1 => "true", 2 => 1))) {
  58. echo "novalidate=\"novalidate\"";
  59. }
  60. // line 14
  61. echo " ";
  62. if (twig_in_filter($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "required", array()), array(0 => "on", 1 => "true", 2 => 1))) {
  63. echo "required=\"required\"";
  64. }
  65. // line 15
  66. echo " ";
  67. if (twig_in_filter($this->getAttribute(($context["field"] ?? null), "multiple", array()), array(0 => "on", 1 => "true", 2 => 1))) {
  68. echo "multiple=\"multiple\"";
  69. }
  70. // line 16
  71. echo " ";
  72. if (($this->getAttribute(($context["field"] ?? null), "disabled", array()) || ($context["isDisabledToggleable"] ?? null))) {
  73. echo "disabled=\"disabled\"";
  74. }
  75. // line 17
  76. echo " ";
  77. if ($this->getAttribute(($context["field"] ?? null), "form", array())) {
  78. echo "form=\"";
  79. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "form", array()), "html", null, true);
  80. echo "\"";
  81. }
  82. // line 18
  83. echo " >
  84. ";
  85. // line 19
  86. $context['_parent'] = $context;
  87. $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["field"] ?? null), "options", array()));
  88. foreach ($context['_seq'] as $context["key"] => $context["text"]) {
  89. // line 20
  90. echo " <option ";
  91. if ((($context["key"] == ($context["value"] ?? null)) || twig_in_filter($context["text"], ($context["value"] ?? null)))) {
  92. echo "selected=\"selected\"";
  93. }
  94. echo " value=\"";
  95. echo twig_escape_filter($this->env, (($this->getAttribute(($context["field"] ?? null), "multiple", array())) ? ($context["text"]) : ($context["key"])), "html", null, true);
  96. echo "\">";
  97. echo twig_escape_filter($this->env, ((twig_test_empty($context["key"])) ? ($context["text"]) : (twig_escape_filter($this->env, twig_date_format_filter($this->env, "now", $context["key"])))), "html", null, true);
  98. echo "</option>
  99. ";
  100. }
  101. $_parent = $context['_parent'];
  102. unset($context['_seq'], $context['_iterated'], $context['key'], $context['text'], $context['_parent'], $context['loop']);
  103. $context = array_intersect_key($context, $_parent) + $_parent;
  104. // line 22
  105. echo " </select>
  106. </div>
  107. ";
  108. }
  109. public function getTemplateName()
  110. {
  111. return "forms/fields/dateformat/dateformat.html.twig";
  112. }
  113. public function isTraitable()
  114. {
  115. return false;
  116. }
  117. public function getDebugInfo()
  118. {
  119. return array ( 111 => 22, 96 => 20, 92 => 19, 89 => 18, 82 => 17, 77 => 16, 72 => 15, 67 => 14, 62 => 13, 58 => 12, 52 => 11, 47 => 10, 44 => 9, 38 => 6, 32 => 4, 29 => 3, 11 => 1,);
  120. }
  121. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  122. public function getSource()
  123. {
  124. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  125. return $this->getSourceContext()->getCode();
  126. }
  127. public function getSourceContext()
  128. {
  129. return new Twig_Source("{% extends \"forms/field.html.twig\" %}
  130. {% block global_attributes %}
  131. data-grav-selectize=\"{{ (field.selectize is defined ? field.selectize : {})|json_encode()|e('html_attr') }}\"
  132. data-grav-field=\"select\"
  133. {{ parent() }}
  134. {% endblock %}
  135. {% block input %}
  136. <div class=\"form-select-wrapper {{ field.size }}\">
  137. <select class=\"{{ field.classes }}\" name=\"{{ (scope ~ field.name)|fieldName ~ (field.multiple ? '[]' : '') }}\"
  138. {% if field.autofocus in ['on', 'true', 1] %}autofocus=\"autofocus\"{% endif %}
  139. {% if field.novalidate in ['on', 'true', 1] %}novalidate=\"novalidate\"{% endif %}
  140. {% if field.validate.required in ['on', 'true', 1] %}required=\"required\"{% endif %}
  141. {% if field.multiple in ['on', 'true', 1] %}multiple=\"multiple\"{% endif %}
  142. {% if field.disabled or isDisabledToggleable %}disabled=\"disabled\"{% endif %}
  143. {% if field.form %}form=\"{{ field.form }}\"{% endif %}
  144. >
  145. {% for key, text in field.options %}
  146. <option {% if key == value or text in value %}selected=\"selected\"{% endif %} value=\"{{ field.multiple ? text : key }}\">{{ key is empty ? text : \"now\"|date(key)|e }}</option>
  147. {% endfor %}
  148. </select>
  149. </div>
  150. {% endblock %}
  151. ", "forms/fields/dateformat/dateformat.html.twig", "/mnt/data/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/forms/fields/dateformat/dateformat.html.twig");
  152. }
  153. }