41e8de888da6e7c93303b372f6e1f966bad06bcd6e142f0fdd7e958983966cab.php 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <?php
  2. /* forms/fields/section/section.html.twig */
  3. class __TwigTemplate_6233a693fffc0aa5b0c096942b3b7968356b097ca51867a916c0266d77562a90 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. if ((twig_test_empty($this->getAttribute(($context["field"] ?? null), "security", array())) || $this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize($this->env->getExtension('Grav\Common\Twig\TwigExtension')->arrayFunc($this->getAttribute(($context["field"] ?? null), "security", array()))))) {
  16. // line 2
  17. echo "
  18. ";
  19. // line 3
  20. if (($this->getAttribute(($context["field"] ?? null), "title", array()) || $this->getAttribute(($context["field"] ?? null), "underline", array()))) {
  21. // line 4
  22. echo " <h1 ";
  23. if ( !$this->getAttribute(($context["field"] ?? null), "underline", array())) {
  24. echo "class=\"no_underline\"";
  25. }
  26. echo ">";
  27. if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "twig", array(), "any", false, true), "twig", array(), "any", false, true), "filters", array(), "any", false, true), "tu", array(), "array", true, true)) {
  28. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "title", array())), "html", null, true);
  29. } else {
  30. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Common\Twig\TwigExtension')->translate($this->getAttribute(($context["field"] ?? null), "title", array())), "html", null, true);
  31. }
  32. echo "</h1>
  33. ";
  34. }
  35. // line 6
  36. echo "
  37. ";
  38. // line 7
  39. if ($this->getAttribute(($context["field"] ?? null), "text", array())) {
  40. // line 8
  41. echo " <p>";
  42. if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "twig", array(), "any", false, true), "twig", array(), "any", false, true), "filters", array(), "any", false, true), "tu", array(), "array", true, true)) {
  43. echo $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "text", array()));
  44. } else {
  45. echo $this->env->getExtension('Grav\Common\Twig\TwigExtension')->translate($this->getAttribute(($context["field"] ?? null), "text", array()));
  46. }
  47. echo "</p>
  48. ";
  49. }
  50. // line 10
  51. echo "
  52. ";
  53. // line 11
  54. if ($this->getAttribute(($context["field"] ?? null), "fields", array())) {
  55. // line 12
  56. echo " <div class=\"form-section ";
  57. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "field_classes", array()), "html", null, true);
  58. echo "\">
  59. ";
  60. // line 13
  61. $context['_parent'] = $context;
  62. $context['_seq'] = twig_ensure_traversable($this->getAttribute($context["field"], "fields", array()));
  63. $context['loop'] = array(
  64. 'parent' => $context['_parent'],
  65. 'index0' => 0,
  66. 'index' => 1,
  67. 'first' => true,
  68. );
  69. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
  70. $length = count($context['_seq']);
  71. $context['loop']['revindex0'] = $length - 1;
  72. $context['loop']['revindex'] = $length;
  73. $context['loop']['length'] = $length;
  74. $context['loop']['last'] = 1 === $length;
  75. }
  76. foreach ($context['_seq'] as $context["_key"] => $context["field"]) {
  77. // line 14
  78. echo " ";
  79. if ($this->getAttribute($context["field"], "type", array())) {
  80. // line 15
  81. echo " ";
  82. $context["value"] = (($this->getAttribute($context["field"], "name", array())) ? ($this->getAttribute(($context["data"] ?? null), "value", array(0 => $this->getAttribute($context["field"], "name", array())), "method")) : ($this->getAttribute(($context["data"] ?? null), "toArray", array())));
  83. // line 16
  84. echo " ";
  85. $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"), "forms/fields/section/section.html.twig", 16)->display($context);
  86. // line 17
  87. echo " ";
  88. }
  89. // line 18
  90. echo " ";
  91. ++$context['loop']['index0'];
  92. ++$context['loop']['index'];
  93. $context['loop']['first'] = false;
  94. if (isset($context['loop']['length'])) {
  95. --$context['loop']['revindex0'];
  96. --$context['loop']['revindex'];
  97. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  98. }
  99. }
  100. $_parent = $context['_parent'];
  101. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
  102. $context = array_intersect_key($context, $_parent) + $_parent;
  103. // line 19
  104. echo " </div>
  105. ";
  106. }
  107. // line 21
  108. echo "
  109. ";
  110. }
  111. }
  112. public function getTemplateName()
  113. {
  114. return "forms/fields/section/section.html.twig";
  115. }
  116. public function isTraitable()
  117. {
  118. return false;
  119. }
  120. public function getDebugInfo()
  121. {
  122. return array ( 112 => 21, 108 => 19, 94 => 18, 91 => 17, 88 => 16, 85 => 15, 82 => 14, 65 => 13, 60 => 12, 58 => 11, 55 => 10, 45 => 8, 43 => 7, 40 => 6, 26 => 4, 24 => 3, 21 => 2, 19 => 1,);
  123. }
  124. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  125. public function getSource()
  126. {
  127. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  128. return $this->getSourceContext()->getCode();
  129. }
  130. public function getSourceContext()
  131. {
  132. return new Twig_Source("{% if field.security is empty or authorize(array(field.security)) %}
  133. {% if field.title or field.underline %}
  134. <h1 {% if not field.underline %}class=\"no_underline\"{% endif %}>{% if grav.twig.twig.filters['tu'] is defined %}{{ field.title|tu }}{% else %}{{ field.title|t }}{% endif %}</h1>
  135. {% endif %}
  136. {% if field.text %}
  137. <p>{% if grav.twig.twig.filters['tu'] is defined %}{{ field.text|tu|raw }}{% else %}{{ field.text|t|raw }}{% endif %}</p>
  138. {% endif %}
  139. {% if field.fields %}
  140. <div class=\"form-section {{ field.field_classes }}\">
  141. {% for field in field.fields %}
  142. {% if field.type %}
  143. {% set value = field.name ? data.value(field.name) : data.toArray %}
  144. {% include [\"forms/fields/#{field.type}/#{field.type}.html.twig\", 'forms/fields/text/text.html.twig'] %}
  145. {% endif %}
  146. {% endfor %}
  147. </div>
  148. {% endif %}
  149. {% endif %}
  150. ", "forms/fields/section/section.html.twig", "/mnt/data/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/forms/fields/section/section.html.twig");
  151. }
  152. }