/app/cache/twig/25/96/6ac8d0118e8405e80aa9e9a321ab78b458b56dc4392b0a216f47197982dc.php

https://gitlab.com/fabiorf/qrcode · PHP · 421 lines · 315 code · 18 blank · 88 comment · 40 complexity · 37b7efa0c4dfa9e46ceb694b3b994702 MD5 · raw file

  1. <?php
  2. /* common/form_div_layout.html.twig */
  3. class __TwigTemplate_25966ac8d0118e8405e80aa9e9a321ab78b458b56dc4392b0a216f47197982dc extends Twig_Template
  4. {
  5. public function __construct(Twig_Environment $env)
  6. {
  7. parent::__construct($env);
  8. $this->parent = $this->env->loadTemplate("form_div_layout.html.twig");
  9. $this->blocks = array(
  10. 'choice_widget_expanded' => array($this, 'block_choice_widget_expanded'),
  11. 'datetime_widget' => array($this, 'block_datetime_widget'),
  12. 'date_widget' => array($this, 'block_date_widget'),
  13. 'time_widget' => array($this, 'block_time_widget'),
  14. 'money_widget' => array($this, 'block_money_widget'),
  15. 'percent_widget' => array($this, 'block_percent_widget'),
  16. 'form_label' => array($this, 'block_form_label'),
  17. 'form_row' => array($this, 'block_form_row'),
  18. 'form_errors' => array($this, 'block_form_errors'),
  19. );
  20. }
  21. protected function doGetParent(array $context)
  22. {
  23. return "form_div_layout.html.twig";
  24. }
  25. protected function doDisplay(array $context, array $blocks = array())
  26. {
  27. $this->parent->display($context, array_merge($this->blocks, $blocks));
  28. }
  29. // line 5
  30. public function block_choice_widget_expanded($context, array $blocks = array())
  31. {
  32. // line 6
  33. ob_start();
  34. // line 7
  35. echo " ";
  36. $context['_parent'] = (array) $context;
  37. $context['_seq'] = twig_ensure_traversable((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")));
  38. foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
  39. // line 8
  40. echo " ";
  41. echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context["child"]) ? $context["child"] : $this->getContext($context, "child")), 'label', array("in_choice_list" => true, "widget" => // line 13
  42. $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context["child"]) ? $context["child"] : $this->getContext($context, "child")), 'widget'), "multiple" => (isset($context["multiple"]) ? $context["multiple"] : $this->getContext($context, "multiple"))));
  43. // line 16
  44. echo "
  45. ";
  46. }
  47. $_parent = $context['_parent'];
  48. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
  49. $context = array_intersect_key($context, $_parent) + $_parent;
  50. echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
  51. }
  52. // line 21
  53. public function block_datetime_widget($context, array $blocks = array())
  54. {
  55. // line 22
  56. ob_start();
  57. // line 23
  58. echo " ";
  59. if (((isset($context["widget"]) ? $context["widget"] : $this->getContext($context, "widget")) == "single_text")) {
  60. // line 24
  61. echo " ";
  62. $this->displayBlock("form_widget_simple", $context, $blocks);
  63. echo "
  64. ";
  65. } else {
  66. // line 26
  67. echo " <div ";
  68. $this->displayBlock("widget_container_attributes", $context, $blocks);
  69. echo ">
  70. ";
  71. // line 27
  72. echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "date"), 'errors');
  73. echo "
  74. ";
  75. // line 28
  76. echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "time"), 'errors');
  77. echo "
  78. ";
  79. // line 29
  80. echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "date"), 'widget', array("datetime" => true));
  81. echo "&nbsp;
  82. ";
  83. // line 30
  84. echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "time"), 'widget', array("datetime" => true));
  85. echo "
  86. </div>
  87. ";
  88. }
  89. echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
  90. }
  91. // line 36
  92. public function block_date_widget($context, array $blocks = array())
  93. {
  94. // line 37
  95. ob_start();
  96. // line 38
  97. echo " ";
  98. if (((isset($context["widget"]) ? $context["widget"] : $this->getContext($context, "widget")) == "single_text")) {
  99. // line 39
  100. echo " ";
  101. $this->displayBlock("form_widget_simple", $context, $blocks);
  102. echo "
  103. ";
  104. } else {
  105. // line 41
  106. echo " ";
  107. if (((!array_key_exists("datetime", $context)) || (false == (isset($context["datetime"]) ? $context["datetime"] : $this->getContext($context, "datetime"))))) {
  108. // line 42
  109. echo " <div ";
  110. $this->displayBlock("widget_container_attributes", $context, $blocks);
  111. echo ">
  112. ";
  113. }
  114. // line 44
  115. echo " ";
  116. echo strtr((isset($context["date_pattern"]) ? $context["date_pattern"] : $this->getContext($context, "date_pattern")), array("{{ year }}" => // line 45
  117. $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "year"), 'widget', array("attr" => array("class" => "span1"))), "{{ month }}" => // line 46
  118. $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "month"), 'widget', array("attr" => array("class" => "span1"))), "{{ day }}" => // line 47
  119. $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "day"), 'widget', array("attr" => array("class" => "span1")))));
  120. // line 48
  121. echo "
  122. ";
  123. // line 49
  124. if (((!array_key_exists("datetime", $context)) || (false == (isset($context["datetime"]) ? $context["datetime"] : $this->getContext($context, "datetime"))))) {
  125. // line 50
  126. echo " </div>
  127. ";
  128. }
  129. // line 52
  130. echo " ";
  131. }
  132. echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
  133. }
  134. // line 56
  135. public function block_time_widget($context, array $blocks = array())
  136. {
  137. // line 57
  138. ob_start();
  139. // line 58
  140. echo " ";
  141. if (((isset($context["widget"]) ? $context["widget"] : $this->getContext($context, "widget")) == "single_text")) {
  142. // line 59
  143. echo " ";
  144. $this->displayBlock("form_widget_simple", $context, $blocks);
  145. echo "
  146. ";
  147. } else {
  148. // line 61
  149. echo " ";
  150. if (((!array_key_exists("datetime", $context)) || (false == (isset($context["datetime"]) ? $context["datetime"] : $this->getContext($context, "datetime"))))) {
  151. // line 62
  152. echo " <div ";
  153. $this->displayBlock("widget_container_attributes", $context, $blocks);
  154. echo ">
  155. ";
  156. }
  157. // line 64
  158. echo " ";
  159. echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "hour"), 'widget', array("attr" => array("class" => "span1")));
  160. echo ":";
  161. echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "minute"), 'widget', array("attr" => array("class" => "span1")));
  162. if ((isset($context["with_seconds"]) ? $context["with_seconds"] : $this->getContext($context, "with_seconds"))) {
  163. echo ":";
  164. echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "second"), 'widget', array("attr" => array("class" => "span1")));
  165. }
  166. // line 65
  167. echo " ";
  168. if (((!array_key_exists("datetime", $context)) || (false == (isset($context["datetime"]) ? $context["datetime"] : $this->getContext($context, "datetime"))))) {
  169. // line 66
  170. echo " </div>
  171. ";
  172. }
  173. // line 68
  174. echo "
  175. ";
  176. }
  177. echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
  178. }
  179. // line 73
  180. public function block_money_widget($context, array $blocks = array())
  181. {
  182. // line 74
  183. ob_start();
  184. // line 75
  185. echo " ";
  186. $context["append"] = ("{{" == twig_slice($this->env, (isset($context["money_pattern"]) ? $context["money_pattern"] : $this->getContext($context, "money_pattern")), 0, 2));
  187. // line 76
  188. echo " <div class=\"";
  189. echo (((isset($context["append"]) ? $context["append"] : $this->getContext($context, "append"))) ? ("input-append") : ("input-prepend"));
  190. echo "\">
  191. ";
  192. // line 77
  193. if ((!(isset($context["append"]) ? $context["append"] : $this->getContext($context, "append")))) {
  194. // line 78
  195. echo " <span class=\"add-on\">
  196. ";
  197. // line 79
  198. echo twig_escape_filter($this->env, strtr((isset($context["money_pattern"]) ? $context["money_pattern"] : $this->getContext($context, "money_pattern")), array("{{ widget }}" => "")), "html", null, true);
  199. echo "
  200. </span>
  201. ";
  202. }
  203. // line 82
  204. echo " ";
  205. $this->displayBlock("form_widget_simple", $context, $blocks);
  206. echo "
  207. ";
  208. // line 83
  209. if ((isset($context["append"]) ? $context["append"] : $this->getContext($context, "append"))) {
  210. // line 84
  211. echo " <span class=\"add-on\">
  212. ";
  213. // line 85
  214. echo twig_escape_filter($this->env, strtr((isset($context["money_pattern"]) ? $context["money_pattern"] : $this->getContext($context, "money_pattern")), array("{{ widget }}" => "")), "html", null, true);
  215. echo "
  216. </span>
  217. ";
  218. }
  219. // line 88
  220. echo " </div>
  221. ";
  222. echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
  223. }
  224. // line 93
  225. public function block_percent_widget($context, array $blocks = array())
  226. {
  227. // line 94
  228. ob_start();
  229. // line 95
  230. echo " <div class=\"input-append\">
  231. ";
  232. // line 96
  233. $this->displayParentBlock("percent_widget", $context, $blocks);
  234. echo "
  235. <span class=\"add-on\">%</span>
  236. </div>
  237. ";
  238. echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
  239. }
  240. // line 104
  241. public function block_form_label($context, array $blocks = array())
  242. {
  243. // line 105
  244. ob_start();
  245. // line 106
  246. echo " ";
  247. if (((array_key_exists("in_choice_list", $context) && (isset($context["in_choice_list"]) ? $context["in_choice_list"] : $this->getContext($context, "in_choice_list"))) && array_key_exists("widget", $context))) {
  248. // line 107
  249. echo " ";
  250. if ((!(isset($context["compound"]) ? $context["compound"] : $this->getContext($context, "compound")))) {
  251. // line 108
  252. echo " ";
  253. $context["label_attr"] = twig_array_merge((isset($context["label_attr"]) ? $context["label_attr"] : $this->getContext($context, "label_attr")), array("for" => (isset($context["id"]) ? $context["id"] : $this->getContext($context, "id"))));
  254. // line 109
  255. echo " ";
  256. }
  257. // line 110
  258. echo " ";
  259. if ((isset($context["required"]) ? $context["required"] : $this->getContext($context, "required"))) {
  260. // line 111
  261. echo " ";
  262. $context["label_attr"] = twig_array_merge((isset($context["label_attr"]) ? $context["label_attr"] : $this->getContext($context, "label_attr")), array("class" => trim(((($this->getAttribute((isset($context["label_attr"]) ? $context["label_attr"] : null), "class", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["label_attr"]) ? $context["label_attr"] : null), "class"), "")) : ("")) . " required"))));
  263. // line 112
  264. echo " ";
  265. }
  266. // line 113
  267. echo " ";
  268. if (twig_test_empty((isset($context["label"]) ? $context["label"] : $this->getContext($context, "label")))) {
  269. // line 114
  270. echo " ";
  271. $context["label"] = call_user_func_array($this->env->getFilter('humanize')->getCallable(), array((isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"))));
  272. // line 115
  273. echo " ";
  274. }
  275. // line 116
  276. echo "
  277. ";
  278. // line 117
  279. if ((array_key_exists("multiple", $context) && (isset($context["multiple"]) ? $context["multiple"] : $this->getContext($context, "multiple")))) {
  280. // line 118
  281. echo " ";
  282. $context["label_attr"] = twig_array_merge((isset($context["label_attr"]) ? $context["label_attr"] : $this->getContext($context, "label_attr")), array("class" => trim(((($this->getAttribute((isset($context["label_attr"]) ? $context["label_attr"] : null), "class", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["label_attr"]) ? $context["label_attr"] : null), "class"), "")) : ("")) . " checkbox"))));
  283. // line 119
  284. echo " ";
  285. } elseif ((array_key_exists("multiple", $context) && (!(isset($context["multiple"]) ? $context["multiple"] : $this->getContext($context, "multiple"))))) {
  286. // line 120
  287. echo " ";
  288. $context["label_attr"] = twig_array_merge((isset($context["label_attr"]) ? $context["label_attr"] : $this->getContext($context, "label_attr")), array("class" => trim(((($this->getAttribute((isset($context["label_attr"]) ? $context["label_attr"] : null), "class", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["label_attr"]) ? $context["label_attr"] : null), "class"), "")) : ("")) . " radio"))));
  289. // line 121
  290. echo " ";
  291. }
  292. // line 122
  293. echo " <label";
  294. $context['_parent'] = (array) $context;
  295. $context['_seq'] = twig_ensure_traversable((isset($context["label_attr"]) ? $context["label_attr"] : $this->getContext($context, "label_attr")));
  296. foreach ($context['_seq'] as $context["attrname"] => $context["attrvalue"]) {
  297. echo " ";
  298. echo twig_escape_filter($this->env, (isset($context["attrname"]) ? $context["attrname"] : $this->getContext($context, "attrname")), "html", null, true);
  299. echo "=\"";
  300. echo twig_escape_filter($this->env, (isset($context["attrvalue"]) ? $context["attrvalue"] : $this->getContext($context, "attrvalue")), "html", null, true);
  301. echo "\"";
  302. }
  303. $_parent = $context['_parent'];
  304. unset($context['_seq'], $context['_iterated'], $context['attrname'], $context['attrvalue'], $context['_parent'], $context['loop']);
  305. $context = array_intersect_key($context, $_parent) + $_parent;
  306. echo ">
  307. ";
  308. // line 123
  309. echo (isset($context["widget"]) ? $context["widget"] : $this->getContext($context, "widget"));
  310. echo "
  311. <span>
  312. ";
  313. // line 125
  314. echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans((isset($context["label"]) ? $context["label"] : $this->getContext($context, "label")), array(), (isset($context["translation_domain"]) ? $context["translation_domain"] : $this->getContext($context, "translation_domain"))), "html", null, true);
  315. echo "
  316. </span>
  317. </label>
  318. ";
  319. } else {
  320. // line 129
  321. echo " ";
  322. $context["label_attr"] = twig_array_merge((isset($context["label_attr"]) ? $context["label_attr"] : $this->getContext($context, "label_attr")), array("class" => trim(((($this->getAttribute((isset($context["label_attr"]) ? $context["label_attr"] : null), "class", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["label_attr"]) ? $context["label_attr"] : null), "class"), "")) : ("")) . " control-label"))));
  323. // line 130
  324. echo " ";
  325. $this->displayParentBlock("form_label", $context, $blocks);
  326. echo "
  327. ";
  328. }
  329. echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
  330. }
  331. // line 137
  332. public function block_form_row($context, array $blocks = array())
  333. {
  334. // line 138
  335. ob_start();
  336. // line 139
  337. echo " <div class=\"control-group";
  338. if ((!$this->getAttribute($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "vars"), "valid"))) {
  339. echo " error";
  340. }
  341. echo "\">
  342. ";
  343. // line 140
  344. echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), 'label', (twig_test_empty($_label_ = ((array_key_exists("label", $context)) ? (_twig_default_filter((isset($context["label"]) ? $context["label"] : $this->getContext($context, "label")), null)) : (null))) ? array() : array("label" => $_label_)));
  345. echo "
  346. <div class=\"controls\">
  347. ";
  348. // line 142
  349. echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), 'widget');
  350. echo "
  351. ";
  352. // line 143
  353. echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), 'errors');
  354. echo "
  355. </div>
  356. </div>
  357. ";
  358. echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
  359. }
  360. // line 149
  361. public function block_form_errors($context, array $blocks = array())
  362. {
  363. // line 150
  364. ob_start();
  365. // line 151
  366. echo " ";
  367. if ((twig_length_filter($this->env, (isset($context["errors"]) ? $context["errors"] : $this->getContext($context, "errors"))) > 0)) {
  368. // line 152
  369. echo " ";
  370. if ($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "parent")) {
  371. echo "<span class=\"help-inline\">";
  372. } else {
  373. echo "<div class=\"alert alert-error error\" >";
  374. }
  375. // line 153
  376. echo " ";
  377. $this->displayParentBlock("form_errors", $context, $blocks);
  378. echo "
  379. ";
  380. // line 154
  381. if ($this->getAttribute((isset($context["form"]) ? $context["form"] : $this->getContext($context, "form")), "parent")) {
  382. echo "</span>";
  383. } else {
  384. echo "</div>";
  385. }
  386. // line 155
  387. echo " ";
  388. }
  389. echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
  390. }
  391. public function getTemplateName()
  392. {
  393. return "common/form_div_layout.html.twig";
  394. }
  395. public function isTraitable()
  396. {
  397. return false;
  398. }
  399. public function getDebugInfo()
  400. {
  401. return array ( 402 => 155, 396 => 154, 391 => 153, 384 => 152, 381 => 151, 379 => 150, 376 => 149, 367 => 143, 363 => 142, 358 => 140, 351 => 139, 349 => 138, 346 => 137, 337 => 130, 334 => 129, 327 => 125, 322 => 123, 306 => 122, 303 => 121, 300 => 120, 297 => 119, 294 => 118, 292 => 117, 289 => 116, 286 => 115, 283 => 114, 280 => 113, 277 => 112, 274 => 111, 271 => 110, 268 => 109, 265 => 108, 262 => 107, 259 => 106, 257 => 105, 254 => 104, 245 => 96, 242 => 95, 240 => 94, 237 => 93, 230 => 88, 224 => 85, 221 => 84, 219 => 83, 214 => 82, 208 => 79, 205 => 78, 203 => 77, 198 => 76, 195 => 75, 193 => 74, 190 => 73, 183 => 68, 179 => 66, 176 => 65, 167 => 64, 161 => 62, 158 => 61, 152 => 59, 149 => 58, 147 => 57, 144 => 56, 138 => 52, 134 => 50, 132 => 49, 129 => 48, 127 => 47, 126 => 46, 125 => 45, 123 => 44, 117 => 42, 114 => 41, 108 => 39, 105 => 38, 103 => 37, 100 => 36, 91 => 30, 87 => 29, 83 => 28, 79 => 27, 74 => 26, 68 => 24, 65 => 23, 63 => 22, 50 => 16, 48 => 13, 46 => 8, 41 => 7, 39 => 6, 60 => 21, 54 => 13, 51 => 12, 45 => 9, 42 => 8, 40 => 7, 36 => 5, 33 => 5, 30 => 4, 25 => 2,);
  402. }
  403. }