var/cache/dev/twig/55/55bbde799e146b4c6708514cefa8105f0c5f73827438994276a80e48e52e6bdc.php line 41

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