f6d99b1d41628a4a81054f5cea08d45c324c7eef81a7be323a5663dc23b1046c.php 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. <?php
  2. /* forms/field.html.twig */
  3. class __TwigTemplate_bc73794aeb9d8c0169cf29307072e81d85ffecb32e9ee7df3de0bd3d70ddbf7b 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. 'field' => array($this, 'block_field'),
  11. 'contents' => array($this, 'block_contents'),
  12. 'label' => array($this, 'block_label'),
  13. 'global_attributes' => array($this, 'block_global_attributes'),
  14. 'group' => array($this, 'block_group'),
  15. 'input' => array($this, 'block_input'),
  16. 'prepend' => array($this, 'block_prepend'),
  17. 'input_attributes' => array($this, 'block_input_attributes'),
  18. 'append' => array($this, 'block_append'),
  19. );
  20. }
  21. protected function doDisplay(array $context, array $blocks = array())
  22. {
  23. // line 1
  24. $context["originalValue"] = ((array_key_exists("originalValue", $context)) ? (($context["originalValue"] ?? null)) : (($context["value"] ?? null)));
  25. // line 2
  26. $context["toggleableChecked"] = ($this->getAttribute(($context["field"] ?? null), "toggleable", array()) && ( !(null === ($context["originalValue"] ?? null)) && !twig_test_empty(($context["originalValue"] ?? null))));
  27. // line 3
  28. $context["isDisabledToggleable"] = ($this->getAttribute(($context["field"] ?? null), "toggleable", array()) && !($context["toggleableChecked"] ?? null));
  29. // line 4
  30. $context["value"] = (((null === ($context["value"] ?? null))) ? ($this->getAttribute(($context["field"] ?? null), "default", array())) : (($context["value"] ?? null)));
  31. // line 5
  32. $context["vertical"] = ($this->getAttribute(($context["field"] ?? null), "style", array()) == "vertical");
  33. // line 6
  34. $context["field_name"] = $this->env->getExtension('Grav\Common\Twig\TwigExtension')->fieldNameFilter((($context["scope"] ?? null) . $this->getAttribute(($context["field"] ?? null), "name", array())));
  35. // line 7
  36. echo "
  37. ";
  38. // line 8
  39. if ((($this->getAttribute(($context["field"] ?? null), "yaml", array()) || ($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "type", array()) == "yaml")) && twig_test_iterable(($context["value"] ?? null)))) {
  40. // line 9
  41. echo " ";
  42. $context["value"] = $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->toYamlFilter(($context["value"] ?? null));
  43. }
  44. // line 11
  45. echo "
  46. ";
  47. // line 12
  48. $this->displayBlock('field', $context, $blocks);
  49. }
  50. public function block_field($context, array $blocks = array())
  51. {
  52. // line 13
  53. echo " <div class=\"form-field grid";
  54. if (($context["vertical"] ?? null)) {
  55. echo " vertical";
  56. }
  57. if ($this->getAttribute(($context["field"] ?? null), "toggleable", array())) {
  58. echo " form-field-toggleable";
  59. }
  60. echo " ";
  61. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "outerclasses", array()), "html", null, true);
  62. echo " ";
  63. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "field_classes", array()), "html", null, true);
  64. echo "\">
  65. ";
  66. // line 14
  67. $this->displayBlock('contents', $context, $blocks);
  68. // line 107
  69. echo " </div>
  70. ";
  71. }
  72. // line 14
  73. public function block_contents($context, array $blocks = array())
  74. {
  75. // line 15
  76. echo " <div class=\"form-label";
  77. if ( !($context["vertical"] ?? null)) {
  78. echo " block size-1-3";
  79. }
  80. echo "\">
  81. ";
  82. // line 16
  83. if ($this->getAttribute(($context["field"] ?? null), "toggleable", array())) {
  84. // line 17
  85. echo " <span class=\"checkboxes toggleable\" data-grav-field=\"toggleable\" data-grav-field-name=\"";
  86. echo twig_escape_filter($this->env, ($context["field_name"] ?? null), "html", null, true);
  87. echo "\">
  88. <input type=\"checkbox\"
  89. id=\"toggleable_";
  90. // line 19
  91. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "name", array()), "html", null, true);
  92. echo "\"
  93. ";
  94. // line 20
  95. if (($context["toggleableChecked"] ?? null)) {
  96. echo "value=\"1\"";
  97. }
  98. // line 21
  99. echo " name=\"toggleable_";
  100. echo twig_escape_filter($this->env, ($context["field_name"] ?? null), "html", null, true);
  101. echo "\"
  102. ";
  103. // line 22
  104. if (($context["toggleableChecked"] ?? null)) {
  105. echo "checked=\"checked\"";
  106. }
  107. // line 23
  108. echo " >
  109. <label for=\"toggleable_";
  110. // line 24
  111. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "name", array()), "html", null, true);
  112. echo "\"></label>
  113. </span>
  114. ";
  115. }
  116. // line 27
  117. echo " <label";
  118. echo (($this->getAttribute(($context["field"] ?? null), "toggleable", array())) ? (((" class=\"toggleable\" for=\"toggleable_" . $this->getAttribute(($context["field"] ?? null), "name", array())) . "\"")) : (""));
  119. echo ">
  120. ";
  121. // line 28
  122. $this->displayBlock('label', $context, $blocks);
  123. // line 44
  124. echo " </label>
  125. ";
  126. // line 45
  127. if ($this->getAttribute(($context["field"] ?? null), "sublabel", array())) {
  128. // line 46
  129. echo " <div class=\"form-sublabel\">
  130. ";
  131. // line 47
  132. if ($this->getAttribute(($context["field"] ?? null), "markdown", array())) {
  133. // line 48
  134. echo " ";
  135. echo $this->env->getExtension('Grav\Common\Twig\TwigExtension')->markdownFunction($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "sublabel", array())), false);
  136. echo "
  137. ";
  138. } else {
  139. // line 50
  140. echo " ";
  141. echo $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "sublabel", array()));
  142. echo "
  143. ";
  144. }
  145. // line 52
  146. echo " </div>
  147. ";
  148. }
  149. // line 54
  150. echo " </div>
  151. <div class=\"form-data";
  152. // line 55
  153. if ( !($context["vertical"] ?? null)) {
  154. echo " block size-2-3";
  155. }
  156. echo "\"
  157. ";
  158. // line 56
  159. $this->displayBlock('global_attributes', $context, $blocks);
  160. // line 61
  161. echo " >
  162. ";
  163. // line 62
  164. $this->displayBlock('group', $context, $blocks);
  165. // line 94
  166. echo " ";
  167. if ($this->getAttribute(($context["field"] ?? null), "description", array())) {
  168. // line 95
  169. echo " <div class=\"form-extra-wrapper ";
  170. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "size", array()), "html", null, true);
  171. echo " ";
  172. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "wrapper_classes", array()), "html", null, true);
  173. echo "\">
  174. <span class=\"form-description\">
  175. ";
  176. // line 97
  177. if ($this->getAttribute(($context["field"] ?? null), "markdown", array())) {
  178. // line 98
  179. echo " ";
  180. echo $this->env->getExtension('Grav\Common\Twig\TwigExtension')->markdownFunction($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "description", array())), false);
  181. echo "
  182. ";
  183. } else {
  184. // line 100
  185. echo " ";
  186. echo $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "description", array()));
  187. echo "
  188. ";
  189. }
  190. // line 102
  191. echo " </span>
  192. </div>
  193. ";
  194. }
  195. // line 105
  196. echo " </div>
  197. ";
  198. }
  199. // line 28
  200. public function block_label($context, array $blocks = array())
  201. {
  202. // line 29
  203. echo " ";
  204. if ($this->getAttribute(($context["field"] ?? null), "help", array())) {
  205. // line 30
  206. echo " ";
  207. if ($this->getAttribute(($context["field"] ?? null), "markdown", array())) {
  208. // line 31
  209. echo " <span class=\"hint--bottom\" data-hint=\"";
  210. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Common\Twig\TwigExtension')->markdownFunction($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "help", array())), false), "html");
  211. echo "\">";
  212. echo $this->env->getExtension('Grav\Common\Twig\TwigExtension')->markdownFunction($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "label", array())), false);
  213. echo "</span>
  214. ";
  215. } else {
  216. // line 33
  217. echo " <span class=\"hint--bottom\" data-hint=\"";
  218. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "help", array())), "html");
  219. echo "\">";
  220. echo $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "label", array()));
  221. echo "</span>
  222. ";
  223. }
  224. // line 35
  225. echo " ";
  226. } else {
  227. // line 36
  228. echo " ";
  229. if ($this->getAttribute(($context["field"] ?? null), "markdown", array())) {
  230. // line 37
  231. echo " ";
  232. echo $this->env->getExtension('Grav\Common\Twig\TwigExtension')->markdownFunction($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "label", array())), false);
  233. echo "
  234. ";
  235. } else {
  236. // line 39
  237. echo " ";
  238. echo $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "label", array()));
  239. echo "
  240. ";
  241. }
  242. // line 41
  243. echo " ";
  244. }
  245. // line 42
  246. echo " ";
  247. echo ((twig_in_filter($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "required", array()), array(0 => "on", 1 => "true", 2 => 1))) ? ("<span class=\"required\">*</span>") : (""));
  248. echo "
  249. ";
  250. }
  251. // line 56
  252. public function block_global_attributes($context, array $blocks = array())
  253. {
  254. // line 57
  255. echo " data-grav-field=\"";
  256. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "type", array()), "html", null, true);
  257. echo "\"
  258. data-grav-disabled=\"";
  259. // line 58
  260. echo twig_escape_filter($this->env, ($context["toggleableChecked"] ?? null), "html", null, true);
  261. echo "\"
  262. data-grav-default=\"";
  263. // line 59
  264. echo twig_escape_filter($this->env, twig_jsonencode_filter($this->getAttribute(($context["field"] ?? null), "default", array())), "html_attr");
  265. echo "\"
  266. ";
  267. }
  268. // line 62
  269. public function block_group($context, array $blocks = array())
  270. {
  271. // line 63
  272. echo " ";
  273. $this->displayBlock('input', $context, $blocks);
  274. // line 93
  275. echo " ";
  276. }
  277. // line 63
  278. public function block_input($context, array $blocks = array())
  279. {
  280. // line 64
  281. echo " <div class=\"form-input-wrapper ";
  282. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "size", array()), "html", null, true);
  283. echo " ";
  284. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "wrapper_classes", array()), "html", null, true);
  285. echo "\">
  286. ";
  287. // line 65
  288. $this->displayBlock('prepend', $context, $blocks);
  289. // line 66
  290. echo " <input
  291. ";
  292. // line 68
  293. echo " name=\"";
  294. echo twig_escape_filter($this->env, ($context["field_name"] ?? null), "html", null, true);
  295. echo "\"
  296. value=\"";
  297. // line 69
  298. echo twig_escape_filter($this->env, twig_join_filter(($context["value"] ?? null), ", "), "html", null, true);
  299. echo "\"
  300. ";
  301. // line 70
  302. if ($this->getAttribute(($context["field"] ?? null), "key", array())) {
  303. // line 71
  304. echo " data-key-observe=\"";
  305. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Common\Twig\TwigExtension')->fieldNameFilter((($context["scope"] ?? null) . ($context["field_name"] ?? null))), "html", null, true);
  306. echo "\"
  307. ";
  308. }
  309. // line 73
  310. echo " ";
  311. // line 74
  312. echo " ";
  313. $this->displayBlock('input_attributes', $context, $blocks);
  314. // line 89
  315. echo " />
  316. ";
  317. // line 90
  318. $this->displayBlock('append', $context, $blocks);
  319. // line 91
  320. echo " </div>
  321. ";
  322. }
  323. // line 65
  324. public function block_prepend($context, array $blocks = array())
  325. {
  326. }
  327. // line 74
  328. public function block_input_attributes($context, array $blocks = array())
  329. {
  330. // line 75
  331. echo " ";
  332. if ($this->getAttribute(($context["field"] ?? null), "classes", array(), "any", true, true)) {
  333. echo "class=\"";
  334. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "classes", array()), "html", null, true);
  335. echo "\" ";
  336. }
  337. // line 76
  338. echo " ";
  339. if ($this->getAttribute(($context["field"] ?? null), "id", array(), "any", true, true)) {
  340. echo "id=\"";
  341. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "id", array()));
  342. echo "\" ";
  343. }
  344. // line 77
  345. echo " ";
  346. if ($this->getAttribute(($context["field"] ?? null), "style", array(), "any", true, true)) {
  347. echo "style=\"";
  348. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "style", array()));
  349. echo "\" ";
  350. }
  351. // line 78
  352. echo " ";
  353. if (($this->getAttribute(($context["field"] ?? null), "disabled", array()) || ($context["isDisabledToggleable"] ?? null))) {
  354. echo "disabled=\"disabled\"";
  355. }
  356. // line 79
  357. echo " ";
  358. if ($this->getAttribute(($context["field"] ?? null), "placeholder", array())) {
  359. echo "placeholder=\"";
  360. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "placeholder", array())), "html", null, true);
  361. echo "\"";
  362. }
  363. // line 80
  364. echo " ";
  365. if (twig_in_filter($this->getAttribute(($context["field"] ?? null), "autofocus", array()), array(0 => "on", 1 => "true", 2 => 1))) {
  366. echo "autofocus=\"autofocus\"";
  367. }
  368. // line 81
  369. echo " ";
  370. if (twig_in_filter($this->getAttribute(($context["field"] ?? null), "novalidate", array()), array(0 => "on", 1 => "true", 2 => 1))) {
  371. echo "novalidate=\"novalidate\"";
  372. }
  373. // line 82
  374. echo " ";
  375. if (twig_in_filter($this->getAttribute(($context["field"] ?? null), "readonly", array()), array(0 => "on", 1 => "true", 2 => 1))) {
  376. echo "readonly=\"readonly\"";
  377. }
  378. // line 83
  379. echo " ";
  380. if (twig_in_filter($this->getAttribute(($context["field"] ?? null), "autocomplete", array()), array(0 => "on", 1 => "off", 2 => "new-password"))) {
  381. echo "autocomplete=\"";
  382. echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "autocomplete", array()), "html", null, true);
  383. echo "\"";
  384. }
  385. // line 84
  386. echo " ";
  387. if (twig_in_filter($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "required", array()), array(0 => "on", 1 => "true", 2 => 1))) {
  388. echo "required=\"required\"";
  389. }
  390. // line 85
  391. echo " ";
  392. if ($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "pattern", array())) {
  393. echo "pattern=\"";
  394. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "pattern", array()), "html", null, true);
  395. echo "\"";
  396. }
  397. // line 86
  398. echo " ";
  399. if ($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "message", array())) {
  400. echo "title=\"";
  401. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter(twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "message", array()))), "html", null, true);
  402. echo "\"
  403. ";
  404. } elseif ($this->getAttribute( // line 87
  405. ($context["field"] ?? null), "title", array(), "any", true, true)) {
  406. echo "title=\"";
  407. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter(twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "title", array()))), "html", null, true);
  408. echo "\" ";
  409. }
  410. // line 88
  411. echo " ";
  412. }
  413. // line 90
  414. public function block_append($context, array $blocks = array())
  415. {
  416. }
  417. public function getTemplateName()
  418. {
  419. return "forms/field.html.twig";
  420. }
  421. public function isTraitable()
  422. {
  423. return false;
  424. }
  425. public function getDebugInfo()
  426. {
  427. return array ( 427 => 90, 423 => 88, 417 => 87, 410 => 86, 403 => 85, 398 => 84, 391 => 83, 386 => 82, 381 => 81, 376 => 80, 369 => 79, 364 => 78, 357 => 77, 350 => 76, 343 => 75, 340 => 74, 335 => 65, 330 => 91, 328 => 90, 325 => 89, 322 => 74, 320 => 73, 314 => 71, 312 => 70, 308 => 69, 303 => 68, 300 => 66, 298 => 65, 291 => 64, 288 => 63, 284 => 93, 281 => 63, 278 => 62, 272 => 59, 268 => 58, 263 => 57, 260 => 56, 253 => 42, 250 => 41, 244 => 39, 238 => 37, 235 => 36, 232 => 35, 224 => 33, 216 => 31, 213 => 30, 210 => 29, 207 => 28, 202 => 105, 197 => 102, 191 => 100, 185 => 98, 183 => 97, 175 => 95, 172 => 94, 170 => 62, 167 => 61, 165 => 56, 159 => 55, 156 => 54, 152 => 52, 146 => 50, 140 => 48, 138 => 47, 135 => 46, 133 => 45, 130 => 44, 128 => 28, 123 => 27, 117 => 24, 114 => 23, 110 => 22, 105 => 21, 101 => 20, 97 => 19, 91 => 17, 89 => 16, 82 => 15, 79 => 14, 74 => 107, 72 => 14, 58 => 13, 52 => 12, 49 => 11, 45 => 9, 43 => 8, 40 => 7, 38 => 6, 36 => 5, 34 => 4, 32 => 3, 30 => 2, 28 => 1,);
  428. }
  429. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  430. public function getSource()
  431. {
  432. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  433. return $this->getSourceContext()->getCode();
  434. }
  435. public function getSourceContext()
  436. {
  437. return new Twig_Source("{% set originalValue = originalValue is defined ? originalValue : value %}
  438. {% set toggleableChecked = field.toggleable and (originalValue is not null and originalValue is not empty) %}
  439. {% set isDisabledToggleable = field.toggleable and not toggleableChecked %}
  440. {% set value = (value is null ? field.default : value) %}
  441. {% set vertical = field.style == 'vertical' %}
  442. {% set field_name = (scope ~ field.name)|fieldName %}
  443. {% if (field.yaml or field.validate.type == 'yaml') and value is iterable%}
  444. {% set value = value|toYaml %}
  445. {% endif %}
  446. {% block field %}
  447. <div class=\"form-field grid{% if vertical %} vertical{% endif %}{% if field.toggleable %} form-field-toggleable{% endif %} {{ field.outerclasses }} {{ field.field_classes }}\">
  448. {% block contents %}
  449. <div class=\"form-label{% if not vertical %} block size-1-3{% endif %}\">
  450. {% if field.toggleable %}
  451. <span class=\"checkboxes toggleable\" data-grav-field=\"toggleable\" data-grav-field-name=\"{{ field_name }}\">
  452. <input type=\"checkbox\"
  453. id=\"toggleable_{{ field.name }}\"
  454. {% if toggleableChecked %}value=\"1\"{% endif %}
  455. name=\"toggleable_{{ field_name }}\"
  456. {% if toggleableChecked %}checked=\"checked\"{% endif %}
  457. >
  458. <label for=\"toggleable_{{ field.name }}\"></label>
  459. </span>
  460. {% endif %}
  461. <label{{ (field.toggleable ? ' class=\"toggleable\" for=\"toggleable_' ~ field.name ~ '\"')|raw }}>
  462. {% block label %}
  463. {% if field.help %}
  464. {% if field.markdown %}
  465. <span class=\"hint--bottom\" data-hint=\"{{ field.help|tu|markdown(false)|e('html') }}\">{{ field.label|tu|markdown(false)|raw }}</span>
  466. {% else %}
  467. <span class=\"hint--bottom\" data-hint=\"{{ field.help|tu|e('html') }}\">{{ field.label|tu|raw }}</span>
  468. {% endif %}
  469. {% else %}
  470. {% if field.markdown %}
  471. {{ field.label|tu|markdown(false)|raw }}
  472. {% else %}
  473. {{ field.label|tu|raw }}
  474. {% endif %}
  475. {% endif %}
  476. {{ field.validate.required in ['on', 'true', 1] ? '<span class=\"required\">*</span>' }}
  477. {% endblock %}
  478. </label>
  479. {% if field.sublabel %}
  480. <div class=\"form-sublabel\">
  481. {% if field.markdown %}
  482. {{ field.sublabel|tu|markdown(false)|raw }}
  483. {% else %}
  484. {{ field.sublabel|tu|raw }}
  485. {% endif %}
  486. </div>
  487. {% endif %}
  488. </div>
  489. <div class=\"form-data{% if not vertical %} block size-2-3{% endif %}\"
  490. {% block global_attributes %}
  491. data-grav-field=\"{{ field.type }}\"
  492. data-grav-disabled=\"{{ toggleableChecked }}\"
  493. data-grav-default=\"{{ field.default|json_encode|e('html_attr') }}\"
  494. {% endblock %}
  495. >
  496. {% block group %}
  497. {% block input %}
  498. <div class=\"form-input-wrapper {{ field.size }} {{ field.wrapper_classes }}\">
  499. {% block prepend %}{% endblock prepend %}
  500. <input
  501. {# required attribute structures #}
  502. name=\"{{ field_name }}\"
  503. value=\"{{ value|join(', ') }}\"
  504. {% if field.key %}
  505. data-key-observe=\"{{ (scope ~ field_name)|fieldName }}\"
  506. {% endif %}
  507. {# input attribute structures #}
  508. {% block input_attributes %}
  509. {% if field.classes is defined %}class=\"{{ field.classes }}\" {% endif %}
  510. {% if field.id is defined %}id=\"{{ field.id|e }}\" {% endif %}
  511. {% if field.style is defined %}style=\"{{ field.style|e }}\" {% endif %}
  512. {% if field.disabled or isDisabledToggleable %}disabled=\"disabled\"{% endif %}
  513. {% if field.placeholder %}placeholder=\"{{ field.placeholder|tu }}\"{% endif %}
  514. {% if field.autofocus in ['on', 'true', 1] %}autofocus=\"autofocus\"{% endif %}
  515. {% if field.novalidate in ['on', 'true', 1] %}novalidate=\"novalidate\"{% endif %}
  516. {% if field.readonly in ['on', 'true', 1] %}readonly=\"readonly\"{% endif %}
  517. {% if field.autocomplete in ['on', 'off', 'new-password'] %}autocomplete=\"{{ field.autocomplete }}\"{% endif %}
  518. {% if field.validate.required in ['on', 'true', 1] %}required=\"required\"{% endif %}
  519. {% if field.validate.pattern %}pattern=\"{{ field.validate.pattern }}\"{% endif %}
  520. {% if field.validate.message %}title=\"{{ field.validate.message|e|tu }}\"
  521. {% elseif field.title is defined %}title=\"{{ field.title|e|tu }}\" {% endif %}
  522. {% endblock %}
  523. />
  524. {% block append %}{% endblock append %}
  525. </div>
  526. {% endblock %}
  527. {% endblock %}
  528. {% if field.description %}
  529. <div class=\"form-extra-wrapper {{ field.size }} {{ field.wrapper_classes }}\">
  530. <span class=\"form-description\">
  531. {% if field.markdown %}
  532. {{ field.description|tu|markdown(false)|raw }}
  533. {% else %}
  534. {{ field.description|tu|raw }}
  535. {% endif %}
  536. </span>
  537. </div>
  538. {% endif %}
  539. </div>
  540. {% endblock %}
  541. </div>
  542. {% endblock %}
  543. ", "forms/field.html.twig", "/mnt/data/Sites/r2c.net/user/plugins/admin/themes/grav/templates/forms/field.html.twig");
  544. }
  545. }