var/cache/dev/twig/6a/6a3fe846e537251b1ba3b0b3469909ab.php line 60

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