<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;

/* @UVDeskCoreFramework/forgotPassword.html.twig */
class __TwigTemplate_a80118b13de488fa628de7db9d926f18 extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'title' => [$this, 'block_title'],
            'templateCSS' => [$this, 'block_templateCSS'],
            'pageWrapper' => [$this, 'block_pageWrapper'],
            'footer' => [$this, 'block_footer'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 1
        return "@UVDeskCoreFramework//Templates//layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 5
        $context["recaptchaDetail"] = CoreExtension::getAttribute($this->env, $this->source, ($context["recaptcha_service"] ?? null), "getRecaptchaDetails", [], "method", false, false, false, 5);
        // line 1
        $this->parent = $this->loadTemplate("@UVDeskCoreFramework//Templates//layout.html.twig", "@UVDeskCoreFramework/forgotPassword.html.twig", 1);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        yield "Forgot Password";
        yield from [];
    }

    // line 7
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_templateCSS(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 8
        yield "    <style>
        #loginForm h1 {
            font-size: 28px;
            color: #6F6F6F;
            font-weight: 600;
            margin: 0px 0px 10px 0px;
        }

        .forgot-password-cta {
            position: absolute;
            font-size: 15px !important;
            right: 0px;
            top: 0px;
        }
    </style>
";
        yield from [];
    }

    // line 25
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_pageWrapper(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 26
        yield "    <div class=\"uv-large-box-plank\">
\t\t<div class=\"uv-large-box-rt\">
\t\t\t<div class=\"uv-center-box uv-text-center\">
                <form action=\"\" method=\"post\" id=\"loginForm\">
                    <div class=\"uv-adjacent-center\">
                        <h1>";
        // line 31
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Forgot Password"), "html", null, true);
        yield "</h1>
                        <div class=\"uv-element-block\">
                            <p>";
        // line 33
        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", null, true);
        yield "</p>
                        </div>
                        <div class=\"uv-adjacent-form\">
                            <div class=\"uv-adjacent-element-block\">
                                <label>";
        // line 37
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email"), "html", null, true);
        yield "</label>
                                <div class=\"uv-max-field\">
                                    <input class=\"uv-field\" type=\"email\" name=\"forgot_password_form[email]\">
                                </div>
                            </div>
                            <div class=\"uv-adjacent-element-block\">
                                ";
        // line 43
        if ((($context["recaptchaDetail"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["recaptchaDetail"] ?? null), "isActive", [], "any", false, false, false, 43) == true))) {
            // line 44
            yield "                                    <div class=\"clearfix\"></div>
                                    <div class=\"g-recaptcha\" data-sitekey=\"";
            // line 45
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["recaptchaDetail"] ?? null), "siteKey", [], "any", false, false, false, 45), "html", null, true);
            yield "\"></div>
                                    <div class=\"clearfix\"></div>
                                ";
        } else {
            // line 48
            yield "                                    <!-- Recaptcha will not support -->
                                ";
        }
        // line 50
        yield "                            </div>
                            <button class=\"uv-btn\">";
        // line 51
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Send Mail"), "html", null, true);
        yield "</button>
                        </div>
                    </div>
                </div>
            </form>
\t\t</div>

\t\t<div class=\"uv-large-box-lt\">
\t\t\t<div class=\"uv-center-box uv-text-center\">
\t\t\t\t<a href=\"https://www.dranzo.com/index.html\">
                    <img alt=\"Dranzo\" title=\"Dranzo\" src=\"";
        // line 61
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/uvdeskcoreframework/images/uvdesk-logo-symbol.svg"), "html", null, true);
        yield "\">
\t\t\t\t</a>
            </div>
\t\t</div>
\t</div>
";
        yield from [];
    }

    // line 68
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_footer(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 69
        yield "    ";
        yield from $this->yieldParentBlock("footer", $context, $blocks);
        yield "
    
    ";
        // line 71
        if ((($context["recaptchaDetail"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["recaptchaDetail"] ?? null), "isActive", [], "any", false, false, false, 71) == true))) {
            // line 72
            yield "        <script src='https://www.google.com/recaptcha/api.js'></script>
    ";
        }
        // line 74
        yield "
    <script type=\"text/javascript\">
\t\t\$(function () {
             _.extend(Backbone.Validation.callbacks, {
                valid : function (view, attr, selector) {
                    var \$el = view.\$('[name=\"' + attr + '\"]');
                    \$el.removeClass('uv-field-error');
                    \$el.parents('.uv-adjacent-element-block').find('.uv-field-message').remove();
                },
                invalid : function (view, attr, error, selector) {
                    var \$el = view.\$('[name=\"' + attr + '\"]');
                    \$el.addClass('uv-field-error');
                    \$el.parents('.uv-adjacent-element-block').find('.uv-field-message').remove();
                    \$el.parents('.uv-adjacent-element-block').append(\"<span class='uv-field-message'>\" + error + \"</span>\");
                }
            });
            
            var LoginModel = Backbone.Model.extend({
                validation: {
                    'forgot_password_form[email]': [{
                        required: true,
                        msg: '";
        // line 95
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
        yield "'
                    },{
                        pattern: 'email',
                        msg: '";
        // line 98
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This is not a valid email address"), "html", null, true);
        yield "'
                    }],
                    ";
        // line 100
        if ((($context["recaptchaDetail"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["recaptchaDetail"] ?? null), "isActive", [], "any", false, false, false, 100) == true))) {
            // line 101
            yield "                        'g-recaptcha-response' : {
                            fn: function(value) {
                                if(grecaptcha.getResponse().length > 0)
                                    return false;
                                else
                                    return true;
                            },
                            msg : '";
            // line 108
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Please select CAPTCHA"), "html", null, true);
            yield "'
                        }
\t\t\t\t    ";
        }
        // line 111
        yield "                }
            });

            var LoginForm = Backbone.View.extend({
\t\t        el: 'form',
                events: {
                    'blur input': 'formChanged',
                    'click .uv-btn': 'submit'
                },
                initialize: function () {
                    this.model = new LoginModel();
                    Backbone.Validation.bind(this);
                },
                formChanged: function(e) {
\t\t\t    \tthis.model.set(Backbone.\$(e.currentTarget).attr('name'), Backbone.\$(e.currentTarget).val())
\t\t\t    \tthis.model.isValid([Backbone.\$(e.currentTarget).attr('name')])
\t\t\t    },
                submit: function (e) {
                    e.preventDefault();
                    var data = this.\$el.serializeObject();

                    this.model.set(data);
                    if(this.model.isValid(true)){
                        this.\$el.submit();
                    }
                }
            });

\t\t    new LoginForm();
\t\t});
\t</script>
";
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "@UVDeskCoreFramework/forgotPassword.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  242 => 111,  236 => 108,  227 => 101,  225 => 100,  220 => 98,  214 => 95,  191 => 74,  187 => 72,  185 => 71,  179 => 69,  172 => 68,  161 => 61,  148 => 51,  145 => 50,  141 => 48,  135 => 45,  132 => 44,  130 => 43,  121 => 37,  114 => 33,  109 => 31,  102 => 26,  95 => 25,  75 => 8,  68 => 7,  57 => 3,  52 => 1,  50 => 5,  43 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "@UVDeskCoreFramework/forgotPassword.html.twig", "/home/bmdranzo/public_html/vendor/uvdesk/core-framework/Resources/views/forgotPassword.html.twig");
    }
}
