var/cache/dev/twig/fe/feb75010d050e00954aaf1f73b0d165c.php line 56

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. /* @UVDeskCoreFramework/login.html.twig */
  16. class __TwigTemplate_a7e9d609e8f004c1219eb06c3f60b7c6 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. 'title' => [$this, 'block_title'],
  29. 'templateCSS' => [$this, 'block_templateCSS'],
  30. 'pageWrapper' => [$this, 'block_pageWrapper'],
  31. 'footer' => [$this, 'block_footer'],
  32. ];
  33. }
  34. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  35. {
  36. // line 1
  37. return "@UVDeskCoreFramework//Templates//layout.html.twig";
  38. }
  39. protected function doDisplay(array $context, array $blocks = []): iterable
  40. {
  41. $macros = $this->macros;
  42. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  43. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@UVDeskCoreFramework/login.html.twig"));
  44. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  45. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@UVDeskCoreFramework/login.html.twig"));
  46. // line 5
  47. $context["recaptchaDetail"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["recaptcha_service"]) || array_key_exists("recaptcha_service", $context) ? $context["recaptcha_service"] : (function () { throw new RuntimeError('Variable "recaptcha_service" does not exist.', 5, $this->source); })()), "getRecaptchaDetails", [], "method", false, false, false, 5);
  48. // line 1
  49. $this->parent = $this->loadTemplate("@UVDeskCoreFramework//Templates//layout.html.twig", "@UVDeskCoreFramework/login.html.twig", 1);
  50. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  51. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  52. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  53. }
  54. // line 3
  55. /**
  56. * @return iterable<null|scalar|\Stringable>
  57. */
  58. public function block_title(array $context, array $blocks = []): iterable
  59. {
  60. $macros = $this->macros;
  61. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  62. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  63. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  64. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  65. yield "Login";
  66. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  67. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  68. yield from [];
  69. }
  70. // line 7
  71. /**
  72. * @return iterable<null|scalar|\Stringable>
  73. */
  74. public function block_templateCSS(array $context, array $blocks = []): iterable
  75. {
  76. $macros = $this->macros;
  77. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  78. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "templateCSS"));
  79. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  80. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "templateCSS"));
  81. // line 8
  82. yield "<style>
  83. #loginForm h1 {
  84. font-size: 28px;
  85. color: #6F6F6F;
  86. font-weight: 600;
  87. margin: 0px 0px 10px 0px;
  88. }
  89. .forgot-password-cta {
  90. position: absolute;
  91. font-size: 15px !important;
  92. right: 0px;
  93. top: 0px;
  94. }
  95. </style>
  96. ";
  97. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  98. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  99. yield from [];
  100. }
  101. // line 25
  102. /**
  103. * @return iterable<null|scalar|\Stringable>
  104. */
  105. public function block_pageWrapper(array $context, array $blocks = []): iterable
  106. {
  107. $macros = $this->macros;
  108. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  109. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "pageWrapper"));
  110. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  111. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "pageWrapper"));
  112. // line 26
  113. yield " <div class=\"uv-large-box-plank\">
  114. \t\t<div class=\"uv-large-box-rt\">
  115. \t\t\t<div class=\"uv-center-box uv-text-center\">
  116. <form action=\"\" method=\"post\" id=\"loginForm\">
  117. <div class=\"uv-adjacent-center\">
  118. <h1>";
  119. // line 31
  120. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Log in to your"), "html", null, true);
  121. yield " <span class=\"uv-brand\">";
  122. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["website"]) || array_key_exists("website", $context) ? $context["website"] : (function () { throw new RuntimeError('Variable "website" does not exist.', 31, $this->source); })()), "name", [], "any", false, false, false, 31), "html", null, true);
  123. yield "</span></h1>
  124. <p>";
  125. // line 32
  126. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Enter your credentials below to gain access to your helpdesk account."), "html", null, true);
  127. yield "</p>
  128. <div class=\"uv-adjacent-form\">
  129. <div class=\"uv-adjacent-element-block\">
  130. <label>";
  131. // line 35
  132. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email"), "html", null, true);
  133. yield "</label>
  134. <div class=\"uv-max-field\">
  135. <input type=\"email\" name=\"_username\">
  136. </div>
  137. </div>
  138. <div class=\"uv-adjacent-element-block\" style=\"position: relative;\">
  139. <label>";
  140. // line 41
  141. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Password"), "html", null, true);
  142. yield "</label>
  143. <div class=\"uv-max-field\">
  144. <a class=\"forgot-password-cta\" href=\"";
  145. // line 43
  146. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_forgot_account_password");
  147. yield "\" tabindex=\"-1\">";
  148. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Forgot Password?"), "html", null, true);
  149. yield "</a>
  150. <input type=\"password\" name=\"_password\">
  151. </div>
  152. </div>
  153. <div class=\"uv-adjacent-element-block\">
  154. <label>
  155. <div class=\"uv-checkbox\">
  156. <input type=\"checkbox\" name=\"_remember_me\" checked>
  157. <span class=\"uv-checkbox-view\"></span>
  158. </div>
  159. <span class=\"uv-checkbox-label\">";
  160. // line 54
  161. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Keep me logged in"), "html", null, true);
  162. yield "</span>
  163. </label>
  164. </div>
  165. <div class=\"uv-adjacent-element-block\">
  166. ";
  167. // line 58
  168. if (((isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 58, $this->source); })()) && (CoreExtension::getAttribute($this->env, $this->source, (isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 58, $this->source); })()), "isActive", [], "any", false, false, false, 58) == true))) {
  169. // line 59
  170. yield " <div class=\"clearfix\"></div>
  171. <div class=\"g-recaptcha\" data-sitekey=\"";
  172. // line 60
  173. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 60, $this->source); })()), "siteKey", [], "any", false, false, false, 60), "html", null, true);
  174. yield "\"></div>
  175. <div class=\"clearfix\"></div>
  176. ";
  177. } else {
  178. // line 63
  179. yield " <!-- Recaptcha will not support -->
  180. ";
  181. }
  182. // line 65
  183. yield " </div>
  184. <button class=\"uv-btn\">";
  185. // line 66
  186. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Sign In"), "html", null, true);
  187. yield "</button>
  188. </div>
  189. </div>
  190. </div>
  191. </form>
  192. \t\t</div>
  193. \t\t<div class=\"uv-large-box-lt\">
  194. \t\t\t<div class=\"uv-center-box uv-text-center\">
  195. \t\t\t\t<a href=\"https://www.uvdesk.com\">
  196. <img alt=\"UVdesk\" title=\"UVdesk\" src=\"";
  197. // line 76
  198. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((((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.', 76, $this->source); })()), "request", [], "any", false, false, false, 76), "scheme", [], "any", false, false, false, 76) . "://") . 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.', 76, $this->source); })()), "request", [], "any", false, false, false, 76), "httpHost", [], "any", false, false, false, 76)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")), "html", null, true);
  199. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["websiteConfiguration"]) || array_key_exists("websiteConfiguration", $context) ? $context["websiteConfiguration"] : (function () { throw new RuntimeError('Variable "websiteConfiguration" does not exist.', 76, $this->source); })()), "website", [], "any", false, false, false, 76), "logo", [], "any", false, false, false, 76), "html", null, true);
  200. yield "\" alt=\"";
  201. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["websiteConfiguration"]) || array_key_exists("websiteConfiguration", $context) ? $context["websiteConfiguration"] : (function () { throw new RuntimeError('Variable "websiteConfiguration" does not exist.', 76, $this->source); })()), "website", [], "any", false, false, false, 76), "name", [], "any", false, false, false, 76), "html", null, true);
  202. yield "\">
  203. \t\t\t\t</a>
  204. </div>
  205. \t\t</div>
  206. \t</div>
  207. ";
  208. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  209. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  210. yield from [];
  211. }
  212. // line 83
  213. /**
  214. * @return iterable<null|scalar|\Stringable>
  215. */
  216. public function block_footer(array $context, array $blocks = []): iterable
  217. {
  218. $macros = $this->macros;
  219. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  220. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "footer"));
  221. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  222. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "footer"));
  223. // line 84
  224. yield " ";
  225. yield from $this->yieldParentBlock("footer", $context, $blocks);
  226. yield "
  227. ";
  228. // line 86
  229. if (((isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 86, $this->source); })()) && (CoreExtension::getAttribute($this->env, $this->source, (isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 86, $this->source); })()), "isActive", [], "any", false, false, false, 86) == true))) {
  230. // line 87
  231. yield " <script src='https://www.google.com/recaptcha/api.js'></script>
  232. ";
  233. }
  234. // line 89
  235. yield "
  236. <script type=\"text/javascript\">
  237. \$(function () {
  238. _.extend(Backbone.Validation.callbacks, {
  239. valid : function (view, attr, selector) {
  240. var \$el = view.\$('[name=\"' + attr + '\"]');
  241. \$el.removeClass('uv-field-error');
  242. \$el.parents('.uv-adjacent-element-block').find('.uv-field-message').remove();
  243. },
  244. invalid : function (view, attr, error, selector) {
  245. var \$el = view.\$('[name=\"' + attr + '\"]');
  246. \$el.addClass('uv-field-error');
  247. \$el.parents('.uv-adjacent-element-block').find('.uv-field-message').remove();
  248. \$el.parents('.uv-adjacent-element-block').append(\"<span class='uv-field-message'>\" + error + \"</span>\");
  249. }
  250. });
  251. var LoginModel = Backbone.Model.extend({
  252. validation: {
  253. '_username': [{
  254. required: true,
  255. msg: '";
  256. // line 110
  257. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
  258. yield "'
  259. },{
  260. pattern: 'email',
  261. msg: '";
  262. // line 113
  263. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This is not a valid email address"), "html", null, true);
  264. yield "'
  265. }],
  266. '_password': [{
  267. required: true,
  268. msg: '";
  269. // line 117
  270. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
  271. yield "'
  272. },{
  273. minLength: 8,
  274. msg: '";
  275. // line 120
  276. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Password must contains 8 Characters"), "html", null, true);
  277. yield "'
  278. }],
  279. ";
  280. // line 122
  281. if (((isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 122, $this->source); })()) && (CoreExtension::getAttribute($this->env, $this->source, (isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail", $context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.', 122, $this->source); })()), "isActive", [], "any", false, false, false, 122) == true))) {
  282. // line 123
  283. yield " 'g-recaptcha-response' : {
  284. fn: function(value) {
  285. if(grecaptcha.getResponse().length > 0)
  286. return false;
  287. else
  288. return true;
  289. },
  290. msg : '";
  291. // line 130
  292. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Please select CAPTCHA"), "html", null, true);
  293. yield "'
  294. }
  295. \t\t\t\t ";
  296. }
  297. // line 133
  298. yield " }
  299. });
  300. var LoginForm = Backbone.View.extend({
  301. events: {
  302. 'click .uv-btn': 'submit',
  303. 'blur input': 'formChanegd'
  304. },
  305. initialize: function () {
  306. Backbone.Validation.bind(this);
  307. ";
  308. // line 143
  309. if (CoreExtension::getAttribute($this->env, $this->source, ($context["error"] ?? null), "messageKey", [], "any", true, true, false, 143)) {
  310. // line 144
  311. yield " app.appView.renderResponseAlert({'alertClass': 'danger', 'alertMessage': '";
  312. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(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.', 144, $this->source); })()), "messageKey", [], "any", false, false, false, 144)), "html", null, true);
  313. yield "'})
  314. ";
  315. }
  316. // line 146
  317. yield " },
  318. formChanegd: function(e) {
  319. \t\t\t \tthis.model.set(Backbone.\$(e.currentTarget).attr('name'), Backbone.\$(e.currentTarget).val())
  320. \t\t\t \tthis.model.isValid([Backbone.\$(e.currentTarget).attr('name')])
  321. \t\t\t },
  322. submit: function (e) {
  323. e.preventDefault();
  324. var data = this.\$el.serializeObject();
  325. this.model.set(data);
  326. if(this.model.isValid(true)){
  327. this.\$el.submit();
  328. }
  329. }
  330. });
  331. var Login = new LoginForm({
  332. \t\t el: \$('#loginForm'),
  333. \t\t model: new LoginModel()
  334. \t\t });
  335. });
  336. </script>
  337. ";
  338. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  339. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  340. yield from [];
  341. }
  342. /**
  343. * @codeCoverageIgnore
  344. */
  345. public function getTemplateName(): string
  346. {
  347. return "@UVDeskCoreFramework/login.html.twig";
  348. }
  349. /**
  350. * @codeCoverageIgnore
  351. */
  352. public function isTraitable(): bool
  353. {
  354. return false;
  355. }
  356. /**
  357. * @codeCoverageIgnore
  358. */
  359. public function getDebugInfo(): array
  360. {
  361. return array ( 360 => 146, 354 => 144, 352 => 143, 340 => 133, 334 => 130, 325 => 123, 323 => 122, 318 => 120, 312 => 117, 305 => 113, 299 => 110, 276 => 89, 272 => 87, 270 => 86, 264 => 84, 251 => 83, 231 => 76, 218 => 66, 215 => 65, 211 => 63, 205 => 60, 202 => 59, 200 => 58, 193 => 54, 177 => 43, 172 => 41, 163 => 35, 157 => 32, 151 => 31, 144 => 26, 131 => 25, 105 => 8, 92 => 7, 69 => 3, 58 => 1, 56 => 5, 43 => 1,);
  362. }
  363. public function getSourceContext(): Source
  364. {
  365. return new Source("{% extends \"@UVDeskCoreFramework//Templates//layout.html.twig\" %}
  366. {% block title %}Login{% endblock %}
  367. {% set recaptchaDetail = recaptcha_service.getRecaptchaDetails() %}
  368. {% block templateCSS %}
  369. <style>
  370. #loginForm h1 {
  371. font-size: 28px;
  372. color: #6F6F6F;
  373. font-weight: 600;
  374. margin: 0px 0px 10px 0px;
  375. }
  376. .forgot-password-cta {
  377. position: absolute;
  378. font-size: 15px !important;
  379. right: 0px;
  380. top: 0px;
  381. }
  382. </style>
  383. {% endblock %}
  384. {% block pageWrapper %}
  385. <div class=\"uv-large-box-plank\">
  386. \t\t<div class=\"uv-large-box-rt\">
  387. \t\t\t<div class=\"uv-center-box uv-text-center\">
  388. <form action=\"\" method=\"post\" id=\"loginForm\">
  389. <div class=\"uv-adjacent-center\">
  390. <h1>{{ \"Log in to your\"|trans }} <span class=\"uv-brand\">{{ website.name }}</span></h1>
  391. <p>{{ \"Enter your credentials below to gain access to your helpdesk account.\"|trans }}</p>
  392. <div class=\"uv-adjacent-form\">
  393. <div class=\"uv-adjacent-element-block\">
  394. <label>{{ \"Email\" |trans}}</label>
  395. <div class=\"uv-max-field\">
  396. <input type=\"email\" name=\"_username\">
  397. </div>
  398. </div>
  399. <div class=\"uv-adjacent-element-block\" style=\"position: relative;\">
  400. <label>{{ \"Password\" |trans}}</label>
  401. <div class=\"uv-max-field\">
  402. <a class=\"forgot-password-cta\" href=\"{{ path('helpdesk_forgot_account_password') }}\" tabindex=\"-1\">{{ \"Forgot Password?\" |trans}}</a>
  403. <input type=\"password\" name=\"_password\">
  404. </div>
  405. </div>
  406. <div class=\"uv-adjacent-element-block\">
  407. <label>
  408. <div class=\"uv-checkbox\">
  409. <input type=\"checkbox\" name=\"_remember_me\" checked>
  410. <span class=\"uv-checkbox-view\"></span>
  411. </div>
  412. <span class=\"uv-checkbox-label\">{{ \"Keep me logged in\" |trans}}</span>
  413. </label>
  414. </div>
  415. <div class=\"uv-adjacent-element-block\">
  416. {% if recaptchaDetail and recaptchaDetail.isActive == true %}
  417. <div class=\"clearfix\"></div>
  418. <div class=\"g-recaptcha\" data-sitekey=\"{{ recaptchaDetail.siteKey }}\"></div>
  419. <div class=\"clearfix\"></div>
  420. {% else %}
  421. <!-- Recaptcha will not support -->
  422. {% endif %}
  423. </div>
  424. <button class=\"uv-btn\">{{ 'Sign In'|trans }}</button>
  425. </div>
  426. </div>
  427. </div>
  428. </form>
  429. \t\t</div>
  430. \t\t<div class=\"uv-large-box-lt\">
  431. \t\t\t<div class=\"uv-center-box uv-text-center\">
  432. \t\t\t\t<a href=\"https://www.uvdesk.com\">
  433. <img alt=\"UVdesk\" title=\"UVdesk\" src=\"{{ app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') }}{{ websiteConfiguration.website.logo }}\" alt=\"{{ websiteConfiguration.website.name}}\">
  434. \t\t\t\t</a>
  435. </div>
  436. \t\t</div>
  437. \t</div>
  438. {% endblock %}
  439. {% block footer %}
  440. {{ parent() }}
  441. {% if recaptchaDetail and recaptchaDetail.isActive == true %}
  442. <script src='https://www.google.com/recaptcha/api.js'></script>
  443. {% endif %}
  444. <script type=\"text/javascript\">
  445. \$(function () {
  446. _.extend(Backbone.Validation.callbacks, {
  447. valid : function (view, attr, selector) {
  448. var \$el = view.\$('[name=\"' + attr + '\"]');
  449. \$el.removeClass('uv-field-error');
  450. \$el.parents('.uv-adjacent-element-block').find('.uv-field-message').remove();
  451. },
  452. invalid : function (view, attr, error, selector) {
  453. var \$el = view.\$('[name=\"' + attr + '\"]');
  454. \$el.addClass('uv-field-error');
  455. \$el.parents('.uv-adjacent-element-block').find('.uv-field-message').remove();
  456. \$el.parents('.uv-adjacent-element-block').append(\"<span class='uv-field-message'>\" + error + \"</span>\");
  457. }
  458. });
  459. var LoginModel = Backbone.Model.extend({
  460. validation: {
  461. '_username': [{
  462. required: true,
  463. msg: '{{ \"This field is mandatory\"|trans }}'
  464. },{
  465. pattern: 'email',
  466. msg: '{{ \"This is not a valid email address\"|trans }}'
  467. }],
  468. '_password': [{
  469. required: true,
  470. msg: '{{\"This field is mandatory\"|trans }}'
  471. },{
  472. minLength: 8,
  473. msg: '{{\"Password must contains 8 Characters\"|trans }}'
  474. }],
  475. {% if recaptchaDetail and recaptchaDetail.isActive == true %}
  476. 'g-recaptcha-response' : {
  477. fn: function(value) {
  478. if(grecaptcha.getResponse().length > 0)
  479. return false;
  480. else
  481. return true;
  482. },
  483. msg : '{{ \"Please select CAPTCHA\"|trans }}'
  484. }
  485. \t\t\t\t {% endif %}
  486. }
  487. });
  488. var LoginForm = Backbone.View.extend({
  489. events: {
  490. 'click .uv-btn': 'submit',
  491. 'blur input': 'formChanegd'
  492. },
  493. initialize: function () {
  494. Backbone.Validation.bind(this);
  495. {% if error.messageKey is defined %}
  496. app.appView.renderResponseAlert({'alertClass': 'danger', 'alertMessage': '{{ error.messageKey|trans}}'})
  497. {% endif %}
  498. },
  499. formChanegd: function(e) {
  500. \t\t\t \tthis.model.set(Backbone.\$(e.currentTarget).attr('name'), Backbone.\$(e.currentTarget).val())
  501. \t\t\t \tthis.model.isValid([Backbone.\$(e.currentTarget).attr('name')])
  502. \t\t\t },
  503. submit: function (e) {
  504. e.preventDefault();
  505. var data = this.\$el.serializeObject();
  506. this.model.set(data);
  507. if(this.model.isValid(true)){
  508. this.\$el.submit();
  509. }
  510. }
  511. });
  512. var Login = new LoginForm({
  513. \t\t el: \$('#loginForm'),
  514. \t\t model: new LoginModel()
  515. \t\t });
  516. });
  517. </script>
  518. {% endblock %}
  519. ", "@UVDeskCoreFramework/login.html.twig", "/var/www/html/exxon-ticketing/src/webkul/uvdesk/core-framework/Resources/views/login.html.twig");
  520. }
  521. }