var/cache/dev/top-intuis-thermo.dtv-projects.com/twig/65/659dd83d618aaba0f4c88499fcead45f.php line 45

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* security/login.html.twig */
  16. class __TwigTemplate_7ad1bc91c91bd842cf1d0a3c76d71cd6 extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->blocks = [
  28. 'content_container' => [$this, 'block_content_container'],
  29. 'content' => [$this, 'block_content'],
  30. 'scripts' => [$this, 'block_scripts'],
  31. ];
  32. }
  33. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  34. {
  35. // line 1
  36. return "security/layout.html.twig";
  37. }
  38. protected function doDisplay(array $context, array $blocks = []): iterable
  39. {
  40. $macros = $this->macros;
  41. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  42. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "security/login.html.twig"));
  43. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  44. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "security/login.html.twig"));
  45. // line 4
  46. $context["loginData"] = $this->env->getRuntime('App\Twig\Runtime\PlatformComponentRuntime')->getFrontDataFromSettingOrYaml("front.security.login", $this->env->getRuntime('App\Twig\YamlOrSettingRuntime')->platformFront("security.login"));
  47. // line 1
  48. $this->parent = $this->load("security/layout.html.twig", 1);
  49. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  50. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  51. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  52. }
  53. // line 6
  54. /**
  55. * @return iterable<null|scalar|\Stringable>
  56. */
  57. public function block_content_container(array $context, array $blocks = []): iterable
  58. {
  59. $macros = $this->macros;
  60. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  61. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content_container"));
  62. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  63. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content_container"));
  64. // line 7
  65. yield " ";
  66. if (CoreExtension::getAttribute($this->env, $this->source, ($context["loginData"] ?? null), "content_container", [], "any", true, true, false, 7)) {
  67. // line 8
  68. yield " ";
  69. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["loginData"]) || array_key_exists("loginData", $context) ? $context["loginData"] : (function () { throw new RuntimeError('Variable "loginData" does not exist.', 8, $this->source); })()), "content_container", [], "any", false, false, false, 8), "html", null, true);
  70. yield "
  71. ";
  72. } else {
  73. // line 9
  74. yield "container";
  75. }
  76. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  77. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  78. yield from [];
  79. }
  80. // line 12
  81. /**
  82. * @return iterable<null|scalar|\Stringable>
  83. */
  84. public function block_content(array $context, array $blocks = []): iterable
  85. {
  86. $macros = $this->macros;
  87. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  88. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  89. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  90. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  91. // line 13
  92. yield " <div class=\"row ";
  93. if (CoreExtension::getAttribute($this->env, $this->source, ($context["loginData"] ?? null), "row_justify", [], "any", true, true, false, 13)) {
  94. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["loginData"]) || array_key_exists("loginData", $context) ? $context["loginData"] : (function () { throw new RuntimeError('Variable "loginData" does not exist.', 13, $this->source); })()), "row_justify", [], "any", false, false, false, 13), "html", null, true);
  95. } else {
  96. yield "justify-content-between";
  97. }
  98. yield "\">
  99. <div class=\"col-md-6\">
  100. ";
  101. // line 15
  102. $context['_parent'] = $context;
  103. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 15, $this->source); })()), "flashes", [], "method", false, false, false, 15));
  104. foreach ($context['_seq'] as $context["type"] => $context["messages"]) {
  105. // line 16
  106. yield " ";
  107. $context['_parent'] = $context;
  108. $context['_seq'] = CoreExtension::ensureTraversable($context["messages"]);
  109. foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
  110. // line 17
  111. yield " <div class=\"alert alert-";
  112. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["type"], "html", null, true);
  113. yield "\">
  114. ";
  115. // line 18
  116. yield $context["message"];
  117. yield "
  118. </div>
  119. ";
  120. }
  121. $_parent = $context['_parent'];
  122. unset($context['_seq'], $context['_key'], $context['message'], $context['_parent']);
  123. $context = array_intersect_key($context, $_parent) + $_parent;
  124. // line 21
  125. yield " ";
  126. }
  127. $_parent = $context['_parent'];
  128. unset($context['_seq'], $context['type'], $context['messages'], $context['_parent']);
  129. $context = array_intersect_key($context, $_parent) + $_parent;
  130. // line 22
  131. yield " ";
  132. if ((($tmp = (isset($context["error"]) || array_key_exists("error", $context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.', 22, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  133. // line 23
  134. yield " <div class=\"alert alert-danger\">";
  135. yield $this->extensions['App\Twig\TwigExtension']->customTrans(CoreExtension::getAttribute($this->env, $this->source, (isset($context["error"]) || array_key_exists("error", $context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.', 23, $this->source); })()), "messageKey", [], "any", false, false, false, 23), CoreExtension::getAttribute($this->env, $this->source, (isset($context["error"]) || array_key_exists("error", $context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.', 23, $this->source); })()), "messageData", [], "any", false, false, false, 23));
  136. yield "</div>
  137. ";
  138. }
  139. // line 25
  140. yield " </div>
  141. <div class=\"w-100\"></div>
  142. ";
  143. // line 29
  144. if (CoreExtension::getAttribute($this->env, $this->source, ($context["loginData"] ?? null), "sections", [], "any", true, true, false, 29)) {
  145. // line 30
  146. yield " ";
  147. $context['_parent'] = $context;
  148. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["loginData"]) || array_key_exists("loginData", $context) ? $context["loginData"] : (function () { throw new RuntimeError('Variable "loginData" does not exist.', 30, $this->source); })()), "sections", [], "any", false, false, false, 30));
  149. $context['loop'] = [
  150. 'parent' => $context['_parent'],
  151. 'index0' => 0,
  152. 'index' => 1,
  153. 'first' => true,
  154. ];
  155. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  156. $length = count($context['_seq']);
  157. $context['loop']['revindex0'] = $length - 1;
  158. $context['loop']['revindex'] = $length;
  159. $context['loop']['length'] = $length;
  160. $context['loop']['last'] = 1 === $length;
  161. }
  162. foreach ($context['_seq'] as $context["k"] => $context["el"]) {
  163. // line 31
  164. yield " ";
  165. if ((((CoreExtension::getAttribute($this->env, $this->source, $context["el"], "enabled", [], "any", false, false, false, 31) || (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 31, $this->source); })()), "request", [], "any", false, false, false, 31), "query", [], "any", false, false, false, 31), "get", ["force_login"], "method", false, false, false, 31) == $this->extensions['App\Twig\TwigExtension']->md5(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["platform"]) || array_key_exists("platform", $context) ? $context["platform"] : (function () { throw new RuntimeError('Variable "platform" does not exist.', 31, $this->source); })()), "global", [], "any", false, false, false, 31), "project_key", [], "any", false, false, false, 31)))) && CoreExtension::getAttribute($this->env, $this->source, $context["el"], "type", [], "any", true, true, false, 31)) && CoreExtension::inFilter(CoreExtension::getAttribute($this->env, $this->source, $context["el"], "type", [], "any", false, false, false, 31), ["default_security_login_form"]))) {
  166. // line 32
  167. yield " ";
  168. yield from $this->load((("@component/molecule/" . CoreExtension::getAttribute($this->env, $this->source, $context["el"], "type", [], "any", false, false, false, 32)) . ".html.twig"), 32)->unwrap()->yield(CoreExtension::merge($context, ["value" => $context["el"], "form" => (isset($context["loginForm"]) || array_key_exists("loginForm", $context) ? $context["loginForm"] : (function () { throw new RuntimeError('Variable "loginForm" does not exist.', 32, $this->source); })()), "hasFormRegister" => (isset($context["hasFormRegister"]) || array_key_exists("hasFormRegister", $context) ? $context["hasFormRegister"] : (function () { throw new RuntimeError('Variable "hasFormRegister" does not exist.', 32, $this->source); })()), "componentKey" => "security.login.sections"]));
  169. // line 33
  170. yield " ";
  171. } elseif ((CoreExtension::getAttribute($this->env, $this->source, $context["el"], "enabled", [], "any", false, false, false, 33) && !($context["k"] === "section_register"))) {
  172. // line 34
  173. yield " ";
  174. yield $this->env->getRuntime('App\Twig\Runtime\PlatformComponentRuntime')->component($context["el"], ("security.login.sections." . $context["k"]));
  175. yield "
  176. ";
  177. }
  178. // line 36
  179. yield " ";
  180. ++$context['loop']['index0'];
  181. ++$context['loop']['index'];
  182. $context['loop']['first'] = false;
  183. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  184. --$context['loop']['revindex0'];
  185. --$context['loop']['revindex'];
  186. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  187. }
  188. }
  189. $_parent = $context['_parent'];
  190. unset($context['_seq'], $context['k'], $context['el'], $context['_parent'], $context['loop']);
  191. $context = array_intersect_key($context, $_parent) + $_parent;
  192. // line 37
  193. yield " ";
  194. }
  195. // line 38
  196. yield " </div>
  197. ";
  198. // line 40
  199. if ((CoreExtension::getAttribute($this->env, $this->source, ($context["loginData"] ?? null), "modal_video_presentation", [], "any", true, true, false, 40) && CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["loginData"]) || array_key_exists("loginData", $context) ? $context["loginData"] : (function () { throw new RuntimeError('Variable "loginData" does not exist.', 40, $this->source); })()), "modal_video_presentation", [], "any", false, false, false, 40), "enabled", [], "any", false, false, false, 40))) {
  200. // line 41
  201. yield " <div class=\"modal fade ";
  202. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["loginData"]) || array_key_exists("loginData", $context) ? $context["loginData"] : (function () { throw new RuntimeError('Variable "loginData" does not exist.', 41, $this->source); })()), "modal_video_presentation", [], "any", false, false, false, 41), "class", [], "any", false, false, false, 41), "html", null, true);
  203. yield "\" id=\"modal_video_presentation\" tabindex=\"-1\" aria-labelledby=\"modal_video_presentation_label\" aria-hidden=\"true\">
  204. <div class=\"modal-dialog modal-dialog-centered\">
  205. <div class=\"modal-content\">
  206. <div class=\"modal-header bg-primary border-primary\">
  207. <h5 class=\"modal-title\" id=\"modal_video_presentation_label\">";
  208. // line 45
  209. yield CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["loginData"]) || array_key_exists("loginData", $context) ? $context["loginData"] : (function () { throw new RuntimeError('Variable "loginData" does not exist.', 45, $this->source); })()), "modal_video_presentation", [], "any", false, false, false, 45), "title", [], "any", false, false, false, 45);
  210. yield "</h5>
  211. <button id=\"btn-close-modal\" type=\"button\" class=\"close btn-close ";
  212. // line 46
  213. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["loginData"]) || array_key_exists("loginData", $context) ? $context["loginData"] : (function () { throw new RuntimeError('Variable "loginData" does not exist.', 46, $this->source); })()), "modal_video_presentation", [], "any", false, false, false, 46), "btn_close_class", [], "any", false, false, false, 46), "html", null, true);
  214. yield "\" data-dismiss=\"modal\" aria-label=\"Close\">
  215. <i class=\"bi bi-x-lg\"></i>
  216. </button>
  217. </div>
  218. <div class=\"modal-body bg-primary border-primary\">
  219. <video id=\"youtube_player\" controls >
  220. ";
  221. // line 52
  222. $context['_parent'] = $context;
  223. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["loginData"]) || array_key_exists("loginData", $context) ? $context["loginData"] : (function () { throw new RuntimeError('Variable "loginData" does not exist.', 52, $this->source); })()), "modal_video_presentation", [], "any", false, false, false, 52), "sources", [], "any", false, false, false, 52));
  224. foreach ($context['_seq'] as $context["type"] => $context["src"]) {
  225. // line 53
  226. yield " ";
  227. if (CoreExtension::getAttribute($this->env, $this->source, $context["src"], "filename", [], "any", true, true, false, 53)) {
  228. // line 54
  229. yield " <source src=\"";
  230. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("static_file_folder", ["fileName" => CoreExtension::getAttribute($this->env, $this->source, $context["src"], "filename", [], "any", false, false, false, 54), "folder" => CoreExtension::getAttribute($this->env, $this->source, $context["src"], "folder", [], "any", false, false, false, 54)]), "html", null, true);
  231. yield "\" type=\"video/";
  232. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["type"], "html", null, true);
  233. yield "\">
  234. ";
  235. } else {
  236. // line 56
  237. yield " <source src=\"";
  238. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["src"], "html", null, true);
  239. yield "\" type=\"video/";
  240. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["type"], "html", null, true);
  241. yield "\">
  242. ";
  243. }
  244. // line 58
  245. yield " ";
  246. }
  247. $_parent = $context['_parent'];
  248. unset($context['_seq'], $context['type'], $context['src'], $context['_parent']);
  249. $context = array_intersect_key($context, $_parent) + $_parent;
  250. // line 59
  251. yield " </video>
  252. </div>
  253. </div>
  254. </div>
  255. </div>
  256. <div class=\"security-modal-btn security-modal-btn-animate ";
  257. // line 65
  258. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["loginData"]) || array_key_exists("loginData", $context) ? $context["loginData"] : (function () { throw new RuntimeError('Variable "loginData" does not exist.', 65, $this->source); })()), "modal_video_presentation", [], "any", false, false, false, 65), "btn", [], "any", false, false, false, 65), "class", [], "any", false, false, false, 65), "html", null, true);
  259. yield "\"
  260. data-toggle=\"modal\"
  261. data-target=\"#modal_video_presentation\">
  262. ";
  263. // line 68
  264. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["loginData"]) || array_key_exists("loginData", $context) ? $context["loginData"] : (function () { throw new RuntimeError('Variable "loginData" does not exist.', 68, $this->source); })()), "modal_video_presentation", [], "any", false, false, false, 68), "btn", [], "any", false, false, false, 68), "content", [], "any", false, false, false, 68), "html", null, true);
  265. yield "
  266. </div>
  267. ";
  268. }
  269. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  270. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  271. yield from [];
  272. }
  273. // line 73
  274. /**
  275. * @return iterable<null|scalar|\Stringable>
  276. */
  277. public function block_scripts(array $context, array $blocks = []): iterable
  278. {
  279. $macros = $this->macros;
  280. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  281. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "scripts"));
  282. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  283. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "scripts"));
  284. // line 74
  285. yield " ";
  286. yield from $this->yieldParentBlock("scripts", $context, $blocks);
  287. yield "
  288. <script>
  289. window.addEventListener('load', addEventModal);
  290. function addEventModal(){
  291. \$('#modal_video_presentation').on('hidden.bs.modal', function (e) {
  292. document.getElementById('youtube_player').pause();
  293. });
  294. \$('#modal_video_presentation').on('shown.bs.modal', function (e) {
  295. document.getElementById('youtube_player').play();
  296. });
  297. }
  298. </script>
  299. ";
  300. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  301. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  302. yield from [];
  303. }
  304. /**
  305. * @codeCoverageIgnore
  306. */
  307. public function getTemplateName(): string
  308. {
  309. return "security/login.html.twig";
  310. }
  311. /**
  312. * @codeCoverageIgnore
  313. */
  314. public function isTraitable(): bool
  315. {
  316. return false;
  317. }
  318. /**
  319. * @codeCoverageIgnore
  320. */
  321. public function getDebugInfo(): array
  322. {
  323. return array ( 319 => 74, 306 => 73, 291 => 68, 285 => 65, 277 => 59, 271 => 58, 263 => 56, 255 => 54, 252 => 53, 248 => 52, 239 => 46, 235 => 45, 227 => 41, 225 => 40, 221 => 38, 218 => 37, 204 => 36, 198 => 34, 195 => 33, 192 => 32, 189 => 31, 171 => 30, 169 => 29, 163 => 25, 157 => 23, 154 => 22, 148 => 21, 139 => 18, 134 => 17, 129 => 16, 125 => 15, 115 => 13, 102 => 12, 90 => 9, 84 => 8, 81 => 7, 68 => 6, 57 => 1, 55 => 4, 42 => 1,);
  324. }
  325. public function getSourceContext(): Source
  326. {
  327. return new Source("{% extends 'security/layout.html.twig' %}
  328. {% set loginData = getFrontDataFromSettingOrYaml('front.security.login', platform_front('security.login') ) %}
  329. {% block content_container %}
  330. {% if loginData.content_container is defined %}
  331. {{ loginData.content_container }}
  332. {% else %}container{% endif %}
  333. {% endblock %}
  334. {% block content %}
  335. <div class=\"row {% if loginData.row_justify is defined %}{{ loginData.row_justify }}{% else %}justify-content-between{% endif %}\">
  336. <div class=\"col-md-6\">
  337. {% for type, messages in app.flashes() %}
  338. {% for message in messages %}
  339. <div class=\"alert alert-{{ type }}\">
  340. {{ message|raw }}
  341. </div>
  342. {% endfor %}
  343. {% endfor %}
  344. {% if error %}
  345. <div class=\"alert alert-danger\">{{ error.messageKey|trans(error.messageData) }}</div>
  346. {% endif %}
  347. </div>
  348. <div class=\"w-100\"></div>
  349. {% if loginData.sections is defined %}
  350. {% for k, el in loginData.sections %}
  351. {% if ( el.enabled or app.request.query.get('force_login') == platform.global.project_key|md5 ) and el.type is defined and el.type in ['default_security_login_form'] %}
  352. {% include '@component/molecule/'~ el.type ~'.html.twig' with {'value': el, 'form': loginForm, 'hasFormRegister': hasFormRegister, componentKey: 'security.login.sections' } %}
  353. {% elseif el.enabled and k is not same as('section_register') %}
  354. {{ component(el,'security.login.sections.'~ k) }}
  355. {% endif %}
  356. {% endfor %}
  357. {% endif %}
  358. </div>
  359. {% if loginData.modal_video_presentation is defined and loginData.modal_video_presentation.enabled %}
  360. <div class=\"modal fade {{ loginData.modal_video_presentation.class }}\" id=\"modal_video_presentation\" tabindex=\"-1\" aria-labelledby=\"modal_video_presentation_label\" aria-hidden=\"true\">
  361. <div class=\"modal-dialog modal-dialog-centered\">
  362. <div class=\"modal-content\">
  363. <div class=\"modal-header bg-primary border-primary\">
  364. <h5 class=\"modal-title\" id=\"modal_video_presentation_label\">{{ loginData.modal_video_presentation.title|raw }}</h5>
  365. <button id=\"btn-close-modal\" type=\"button\" class=\"close btn-close {{ loginData.modal_video_presentation.btn_close_class }}\" data-dismiss=\"modal\" aria-label=\"Close\">
  366. <i class=\"bi bi-x-lg\"></i>
  367. </button>
  368. </div>
  369. <div class=\"modal-body bg-primary border-primary\">
  370. <video id=\"youtube_player\" controls >
  371. {% for type,src in loginData.modal_video_presentation.sources %}
  372. {% if src.filename is defined %}
  373. <source src=\"{{ path('static_file_folder', {'fileName': src.filename, 'folder': src.folder}) }}\" type=\"video/{{ type }}\">
  374. {% else %}
  375. <source src=\"{{ src }}\" type=\"video/{{ type }}\">
  376. {% endif %}
  377. {% endfor %}
  378. </video>
  379. </div>
  380. </div>
  381. </div>
  382. </div>
  383. <div class=\"security-modal-btn security-modal-btn-animate {{ loginData.modal_video_presentation.btn.class }}\"
  384. data-toggle=\"modal\"
  385. data-target=\"#modal_video_presentation\">
  386. {{ loginData.modal_video_presentation.btn.content }}
  387. </div>
  388. {% endif %}
  389. {% endblock %}
  390. {% block scripts %}
  391. {{ parent() }}
  392. <script>
  393. window.addEventListener('load', addEventModal);
  394. function addEventModal(){
  395. \$('#modal_video_presentation').on('hidden.bs.modal', function (e) {
  396. document.getElementById('youtube_player').pause();
  397. });
  398. \$('#modal_video_presentation').on('shown.bs.modal', function (e) {
  399. document.getElementById('youtube_player').play();
  400. });
  401. }
  402. </script>
  403. {% endblock %}
  404. ", "security/login.html.twig", "/var/www/dtv-preprod/current/templates/security/login.html.twig");
  405. }
  406. }