var/cache/dev/twig/9f/9fb189012b39552676da502359301d1c.php line 51

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