var/cache/dev/twig/cf/cf669f3a4d61d8e0d2a9cb7d2b13c0d2d2ab8d360a72e8d9eda4c0d1aebe76e2.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/login.html.twig */
  14. class __TwigTemplate_334b08d717f2e8239ed4de37c1e07554634122fc30473f9f295514ab77aab520 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/login.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/login.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/login.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 "Login";
  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("Log in to your"), "html"nulltrue);
  111.         echo " <span class=\"uv-brand\">";
  112.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["website"]) || array_key_exists("website"$context) ? $context["website"] : (function () { throw new RuntimeError('Variable "website" does not exist.'31$this->source); })()), "name", [], "any"falsefalsefalse31), "html"nulltrue);
  113.         echo "</span></h1>
  114.                         <p>";
  115.         // line 32
  116.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Enter your credentials below to gain access to your helpdesk account."), "html"nulltrue);
  117.         echo "</p>
  118.                         <div class=\"uv-adjacent-form\">
  119.                             <div class=\"uv-adjacent-element-block\">
  120.                                 <label>";
  121.         // line 35
  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 type=\"email\" name=\"_username\">
  126.                                 </div>
  127.                             </div>
  128.                             <div class=\"uv-adjacent-element-block\" style=\"position: relative;\">
  129.                                 <label>";
  130.         // line 41
  131.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Password"), "html"nulltrue);
  132.         echo "</label>
  133.                                 <div class=\"uv-max-field\">
  134.                                     <a class=\"forgot-password-cta\" href=\"";
  135.         // line 43
  136.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_forgot_account_password");
  137.         echo "\" tabindex=\"-1\">";
  138.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Forgot Password?"), "html"nulltrue);
  139.         echo "</a>
  140.                                     <input type=\"password\"  name=\"_password\">
  141.                                 </div>
  142.                             </div>
  143.                             <div class=\"uv-adjacent-element-block\">
  144.                                 <label>
  145.                                     <div class=\"uv-checkbox\">
  146.                                         <input type=\"checkbox\" name=\"_remember_me\" checked>
  147.                                         <span class=\"uv-checkbox-view\"></span>
  148.                                     </div>
  149.                                     <span class=\"uv-checkbox-label\">";
  150.         // line 54
  151.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Keep me logged in"), "html"nulltrue);
  152.         echo "</span>
  153.                                 </label>
  154.                             </div>
  155.                             <div class=\"uv-adjacent-element-block\">
  156.                                 ";
  157.         // line 58
  158.         if (((isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail"$context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.'58$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.'58$this->source); })()), "isActive", [], "any"falsefalsefalse58), true)))) {
  159.             // line 59
  160.             echo "                                    <div class=\"clearfix\"></div>
  161.                                     <div class=\"g-recaptcha\" data-sitekey=\"";
  162.             // line 60
  163.             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.'60$this->source); })()), "siteKey", [], "any"falsefalsefalse60), "html"nulltrue);
  164.             echo "\"></div>
  165.                                     <div class=\"clearfix\"></div>
  166.                                 ";
  167.         } else {
  168.             // line 63
  169.             echo "                                    <!-- Recaptcha will not support -->
  170.                                 ";
  171.         }
  172.         // line 65
  173.         echo "                            </div>
  174.                             <button class=\"uv-btn\">";
  175.         // line 66
  176.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Sign In"), "html"nulltrue);
  177.         echo "</button>
  178.                         </div>
  179.                     </div>
  180.                 </div>
  181.             </form>
  182. \t\t</div>
  183. \t\t<div class=\"uv-large-box-lt\">
  184. \t\t\t<div class=\"uv-center-box uv-text-center\">
  185. \t\t\t\t<a href=\"https://www.uvdesk.com\">
  186.                     <img alt=\"UVdesk\" title=\"UVdesk\" src=\"";
  187.         // line 76
  188.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/uvdeskcoreframework/images/uvdesk-logo-symbol.svg"), "html"nulltrue);
  189.         echo "\">
  190. \t\t\t\t</a>
  191.             </div>
  192. \t\t</div>
  193. \t</div>
  194. ";
  195.         
  196.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  197.         
  198.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  199.     }
  200.     // line 83
  201.     public function block_footer($context, array $blocks = [])
  202.     {
  203.         $macros $this->macros;
  204.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  205.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""footer"));
  206.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  207.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""footer"));
  208.         // line 84
  209.         echo "    ";
  210.         $this->displayParentBlock("footer"$context$blocks);
  211.         echo "
  212.     ";
  213.         // line 86
  214.         if (((isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail"$context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.'86$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.'86$this->source); })()), "isActive", [], "any"falsefalsefalse86), true)))) {
  215.             // line 87
  216.             echo "        <script src='https://www.google.com/recaptcha/api.js'></script>
  217.     ";
  218.         }
  219.         // line 89
  220.         echo "
  221.     <script type=\"text/javascript\">
  222.         \$(function () {
  223.              _.extend(Backbone.Validation.callbacks, {
  224.                 valid : function (view, attr, selector) {
  225.                     var \$el = view.\$('[name=\"' + attr + '\"]');
  226.                     \$el.removeClass('uv-field-error');
  227.                     \$el.parents('.uv-adjacent-element-block').find('.uv-field-message').remove();
  228.                 },
  229.                 invalid : function (view, attr, error, selector) {
  230.                     var \$el = view.\$('[name=\"' + attr + '\"]');
  231.                     \$el.addClass('uv-field-error');
  232.                     \$el.parents('.uv-adjacent-element-block').find('.uv-field-message').remove();
  233.                     \$el.parents('.uv-adjacent-element-block').append(\"<span class='uv-field-message'>\" + error + \"</span>\");
  234.                 }
  235.             });
  236.             var LoginModel = Backbone.Model.extend({
  237.                 validation: {
  238.                     '_username': [{
  239.                         required: true,
  240.                         msg: '";
  241.         // line 110
  242.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html"nulltrue);
  243.         echo "'
  244.                     },{
  245.                         pattern: 'email',
  246.                         msg: '";
  247.         // line 113
  248.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This is not a valid email address"), "html"nulltrue);
  249.         echo "'
  250.                     }],
  251.                     '_password': [{
  252.                         required: true,
  253.                         msg: '";
  254.         // line 117
  255.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html"nulltrue);
  256.         echo "'
  257.                     },{
  258.                         minLength: 8,
  259.                         msg: '";
  260.         // line 120
  261.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Password must contains 8 Characters"), "html"nulltrue);
  262.         echo "'
  263.                     }],
  264.                     ";
  265.         // line 122
  266.         if (((isset($context["recaptchaDetail"]) || array_key_exists("recaptchaDetail"$context) ? $context["recaptchaDetail"] : (function () { throw new RuntimeError('Variable "recaptchaDetail" does not exist.'122$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.'122$this->source); })()), "isActive", [], "any"falsefalsefalse122), true)))) {
  267.             // line 123
  268.             echo "                        'g-recaptcha-response' : {
  269.                             fn: function(value) {
  270.                                 if(grecaptcha.getResponse().length > 0)
  271.                                     return false;
  272.                                 else
  273.                                     return true;
  274.                             },
  275.                             msg : '";
  276.             // line 130
  277.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Please select CAPTCHA"), "html"nulltrue);
  278.             echo "'
  279.                         }
  280. \t\t\t\t    ";
  281.         }
  282.         // line 133
  283.         echo "                }
  284.             });
  285.             var LoginForm = Backbone.View.extend({
  286.                 events: {
  287.                     'click .uv-btn': 'submit',
  288.                     'blur input': 'formChanegd'
  289.                 },
  290.                 initialize: function () {
  291.                     Backbone.Validation.bind(this);
  292.                     ";
  293.         // line 143
  294.         if (twig_get_attribute($this->env$this->source, ($context["error"] ?? null), "messageKey", [], "any"truetruefalse143)) {
  295.             // line 144
  296.             echo "                        app.appView.renderResponseAlert({'alertClass': 'danger', 'alertMessage': '";
  297.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source, (isset($context["error"]) || array_key_exists("error"$context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.'144$this->source); })()), "messageKey", [], "any"falsefalsefalse144)), "html"nulltrue);
  298.             echo "'})
  299.                     ";
  300.         }
  301.         // line 146
  302.         echo "                },
  303.                 formChanegd: function(e) {
  304. \t\t\t    \tthis.model.set(Backbone.\$(e.currentTarget).attr('name'), Backbone.\$(e.currentTarget).val())
  305. \t\t\t    \tthis.model.isValid([Backbone.\$(e.currentTarget).attr('name')])
  306. \t\t\t    },
  307.                 submit: function (e) {
  308.                     e.preventDefault();
  309.                     var data = this.\$el.serializeObject();
  310.                     this.model.set(data);
  311.                     if(this.model.isValid(true)){
  312.                         this.\$el.submit();
  313.                     }
  314.                 }
  315.             });
  316.             var Login = new LoginForm({
  317. \t\t        el: \$('#loginForm'),
  318. \t\t        model: new LoginModel()
  319. \t\t    });
  320.         });
  321.     </script>
  322. ";
  323.         
  324.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  325.         
  326.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  327.     }
  328.     public function getTemplateName()
  329.     {
  330.         return "@UVDeskCoreFramework/login.html.twig";
  331.     }
  332.     public function isTraitable()
  333.     {
  334.         return false;
  335.     }
  336.     public function getDebugInfo()
  337.     {
  338.         return array (  337 => 146,  331 => 144,  329 => 143,  317 => 133,  311 => 130,  302 => 123,  300 => 122,  295 => 120,  289 => 117,  282 => 113,  276 => 110,  253 => 89,  249 => 87,  247 => 86,  241 => 84,  231 => 83,  215 => 76,  202 => 66,  199 => 65,  195 => 63,  189 => 60,  186 => 59,  184 => 58,  177 => 54,  161 => 43,  156 => 41,  147 => 35,  141 => 32,  135 => 31,  128 => 26,  118 => 25,  93 => 8,  83 => 7,  64 => 3,  53 => 1,  51 => 5,  38 => 1,);
  339.     }
  340.     public function getSourceContext()
  341.     {
  342.         return new Source("{% extends \"@UVDeskCoreFramework//Templates//layout.html.twig\" %}
  343. {% block title %}Login{% endblock %}
  344. {% set recaptchaDetail = recaptcha_service.getRecaptchaDetails() %}
  345. {% block templateCSS %}
  346. <style>
  347.     #loginForm h1 {
  348.         font-size: 28px;
  349.         color: #6F6F6F;
  350.         font-weight: 600;
  351.         margin: 0px 0px 10px 0px;
  352.     }
  353.     .forgot-password-cta {
  354.         position: absolute;
  355.         font-size: 15px !important;
  356.         right: 0px;
  357.         top: 0px;
  358.     }
  359. </style>
  360. {% endblock %}
  361. {% block pageWrapper %}
  362.     <div class=\"uv-large-box-plank\">
  363. \t\t<div class=\"uv-large-box-rt\">
  364. \t\t\t<div class=\"uv-center-box uv-text-center\">
  365.                 <form action=\"\" method=\"post\" id=\"loginForm\">
  366.                     <div class=\"uv-adjacent-center\">
  367.                         <h1>{{ \"Log in to your\"|trans }} <span class=\"uv-brand\">{{ website.name }}</span></h1>
  368.                         <p>{{ \"Enter your credentials below to gain access to your helpdesk account.\"|trans }}</p>
  369.                         <div class=\"uv-adjacent-form\">
  370.                             <div class=\"uv-adjacent-element-block\">
  371.                                 <label>{{ \"Email\" |trans}}</label>
  372.                                 <div class=\"uv-max-field\">
  373.                                     <input type=\"email\" name=\"_username\">
  374.                                 </div>
  375.                             </div>
  376.                             <div class=\"uv-adjacent-element-block\" style=\"position: relative;\">
  377.                                 <label>{{ \"Password\" |trans}}</label>
  378.                                 <div class=\"uv-max-field\">
  379.                                     <a class=\"forgot-password-cta\" href=\"{{ path('helpdesk_forgot_account_password') }}\" tabindex=\"-1\">{{ \"Forgot Password?\" |trans}}</a>
  380.                                     <input type=\"password\"  name=\"_password\">
  381.                                 </div>
  382.                             </div>
  383.                             <div class=\"uv-adjacent-element-block\">
  384.                                 <label>
  385.                                     <div class=\"uv-checkbox\">
  386.                                         <input type=\"checkbox\" name=\"_remember_me\" checked>
  387.                                         <span class=\"uv-checkbox-view\"></span>
  388.                                     </div>
  389.                                     <span class=\"uv-checkbox-label\">{{ \"Keep me logged in\" |trans}}</span>
  390.                                 </label>
  391.                             </div>
  392.                             <div class=\"uv-adjacent-element-block\">
  393.                                 {% if recaptchaDetail and recaptchaDetail.isActive == true %}
  394.                                     <div class=\"clearfix\"></div>
  395.                                     <div class=\"g-recaptcha\" data-sitekey=\"{{ recaptchaDetail.siteKey }}\"></div>
  396.                                     <div class=\"clearfix\"></div>
  397.                                 {% else %}
  398.                                     <!-- Recaptcha will not support -->
  399.                                 {% endif %}
  400.                             </div>
  401.                             <button class=\"uv-btn\">{{ 'Sign In'|trans }}</button>
  402.                         </div>
  403.                     </div>
  404.                 </div>
  405.             </form>
  406. \t\t</div>
  407. \t\t<div class=\"uv-large-box-lt\">
  408. \t\t\t<div class=\"uv-center-box uv-text-center\">
  409. \t\t\t\t<a href=\"https://www.uvdesk.com\">
  410.                     <img alt=\"UVdesk\" title=\"UVdesk\" src=\"{{ asset('bundles/uvdeskcoreframework/images/uvdesk-logo-symbol.svg') }}\">
  411. \t\t\t\t</a>
  412.             </div>
  413. \t\t</div>
  414. \t</div>
  415. {% endblock %}
  416. {% block footer %}
  417.     {{ parent() }}
  418.     {% if recaptchaDetail and recaptchaDetail.isActive == true %}
  419.         <script src='https://www.google.com/recaptcha/api.js'></script>
  420.     {% endif %}
  421.     <script type=\"text/javascript\">
  422.         \$(function () {
  423.              _.extend(Backbone.Validation.callbacks, {
  424.                 valid : function (view, attr, selector) {
  425.                     var \$el = view.\$('[name=\"' + attr + '\"]');
  426.                     \$el.removeClass('uv-field-error');
  427.                     \$el.parents('.uv-adjacent-element-block').find('.uv-field-message').remove();
  428.                 },
  429.                 invalid : function (view, attr, error, selector) {
  430.                     var \$el = view.\$('[name=\"' + attr + '\"]');
  431.                     \$el.addClass('uv-field-error');
  432.                     \$el.parents('.uv-adjacent-element-block').find('.uv-field-message').remove();
  433.                     \$el.parents('.uv-adjacent-element-block').append(\"<span class='uv-field-message'>\" + error + \"</span>\");
  434.                 }
  435.             });
  436.             var LoginModel = Backbone.Model.extend({
  437.                 validation: {
  438.                     '_username': [{
  439.                         required: true,
  440.                         msg: '{{ \"This field is mandatory\"|trans }}'
  441.                     },{
  442.                         pattern: 'email',
  443.                         msg: '{{ \"This is not a valid email address\"|trans }}'
  444.                     }],
  445.                     '_password': [{
  446.                         required: true,
  447.                         msg: '{{\"This field is mandatory\"|trans }}'
  448.                     },{
  449.                         minLength: 8,
  450.                         msg: '{{\"Password must contains 8 Characters\"|trans }}'
  451.                     }],
  452.                     {% if recaptchaDetail and recaptchaDetail.isActive == true %}
  453.                         'g-recaptcha-response' : {
  454.                             fn: function(value) {
  455.                                 if(grecaptcha.getResponse().length > 0)
  456.                                     return false;
  457.                                 else
  458.                                     return true;
  459.                             },
  460.                             msg : '{{ \"Please select CAPTCHA\"|trans }}'
  461.                         }
  462. \t\t\t\t    {% endif %}
  463.                 }
  464.             });
  465.             var LoginForm = Backbone.View.extend({
  466.                 events: {
  467.                     'click .uv-btn': 'submit',
  468.                     'blur input': 'formChanegd'
  469.                 },
  470.                 initialize: function () {
  471.                     Backbone.Validation.bind(this);
  472.                     {% if error.messageKey is defined %}
  473.                         app.appView.renderResponseAlert({'alertClass': 'danger', 'alertMessage': '{{ error.messageKey|trans}}'})
  474.                     {% endif %}
  475.                 },
  476.                 formChanegd: function(e) {
  477. \t\t\t    \tthis.model.set(Backbone.\$(e.currentTarget).attr('name'), Backbone.\$(e.currentTarget).val())
  478. \t\t\t    \tthis.model.isValid([Backbone.\$(e.currentTarget).attr('name')])
  479. \t\t\t    },
  480.                 submit: function (e) {
  481.                     e.preventDefault();
  482.                     var data = this.\$el.serializeObject();
  483.                     this.model.set(data);
  484.                     if(this.model.isValid(true)){
  485.                         this.\$el.submit();
  486.                     }
  487.                 }
  488.             });
  489.             var Login = new LoginForm({
  490. \t\t        el: \$('#loginForm'),
  491. \t\t        model: new LoginModel()
  492. \t\t    });
  493.         });
  494.     </script>
  495. {% endblock %}
  496. ""@UVDeskCoreFramework/login.html.twig""/home/users/akshay.kumar/Workstation/web/community-skeleton/vendor/uvdesk/core-framework/Resources/views/login.html.twig");
  497.     }
  498. }