var/cache/dev/twig/35/35d313a3adfb94d72d65cf969aa232134320560ffc12e504c6883b2b51fbe958.php line 55

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