var/cache/dev/twig/13/131e5765b0b0ff0047ad31c34900e87e55d6a1ff02f08ccc722a5502d0671ad3.php line 34

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. /* @HoneybeeWeb/pages/find_account.html.twig */
  15. class __TwigTemplate_fe24ef202a7baa9232c80536bc7934dcba1887f33a52649f23308064f6cd6103 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->parent false;
  24.         $this->blocks = [
  25.         ];
  26.     }
  27.     protected function doDisplay(array $context, array $blocks = [])
  28.     {
  29.         $macros $this->macros;
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  31.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@HoneybeeWeb/pages/find_account.html.twig"));
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  33.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@HoneybeeWeb/pages/find_account.html.twig"));
  34.         // line 1
  35.         yield from         $this->loadTemplate("@Application/inc/central_header.html.twig""@HoneybeeWeb/pages/find_account.html.twig"1)->unwrap()->yield($context);
  36.         // line 2
  37.         yield "<section class=\"create-account-page section\">
  38.     <div class=\"container\">
  39.         <div class=\"row\">
  40.             <div class=\"col-md-12 d-flex justify-content-center align-items-center\">
  41.                 <div class=\"section-head-area\">
  42.                     <h1 class=\"section-title\">Find Your Account</h1>
  43.                 </div>
  44.             </div>
  45.         </div>
  46.         <div class=\"row\">
  47.             <div class=\"signup-form-wrapper\">
  48.                 <form class=\"signup-form\" name=\"signup_form\" id=\"relevantForm\" method=\"post\">
  49.                     <div class=\"email warning-\">
  50.                         <label for=\"email\" >Please Provide Your Email Address</label>
  51.                         <input type=\"email\"  class=\" exist-error email checkIfExists ";
  52.         // line 21
  53.         yield (((=== CoreExtension::compare((isset($context["errorField"]) || array_key_exists("errorField"$context) ? $context["errorField"] : (function () { throw new RuntimeError('Variable "errorField" does not exist.'21$this->source); })()), "email"))) ? ("error_class") : (""));
  54.         yield "\" id=\"email\" name=\"email\" data-field-type=\"email\" required>
  55.                         <p class=\"small_error_text email\"></p>
  56.                     </div>
  57.                     <button type=\"submit\" class=\"submit-button rel_form_submit\" style='background-color: #2673B8' id=\"\" >Confirm</button>
  58.                     <p class=\"login-link\"> <a href=\"";
  59.         // line 30
  60.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("user_login");
  61.         yield "\">Back to Login</a></p>
  62.                 </form>
  63.             </div>
  64.         </div>
  65.     </div>
  66. </section>
  67. ";
  68.         // line 38
  69.         yield from         $this->loadTemplate("@HoneybeeWeb/footer/central_footer.html.twig""@HoneybeeWeb/pages/find_account.html.twig"38)->unwrap()->yield($context);
  70.         // line 39
  71.         yield "
  72. <script>
  73.     var fbt='';
  74.     function validatePassword(txt) {
  75.         var p = txt,
  76.             errors = [];
  77.         if (p.length < 8) {
  78.             errors.push(\"Your password must be at least 8 characters\");
  79.         }
  80.         if (p.search(/[a-z]/i) < 0) {
  81.             errors.push(\"Your password must contain at least one letter.\");
  82.         }
  83.         if (p.search(/[0-9]/) < 0) {
  84.             errors.push(\"Your password must contain at least one digit.\");
  85.         }
  86.         if (errors.length > 0) {
  87.             return errors.join(\" and \");
  88.         }
  89.         return '';
  90.     }
  91.     \$(document).ready(function(){
  92.         \$.ajaxSetup({ cache: true });
  93.         \$.getScript('https://connect.facebook.net/en_US/sdk.js', function(){
  94.             FB.init({
  95.                 appId: '1116951735682132',
  96.                 version: 'v2.7' // or v2.1, v2.2, v2.3, ...
  97.             });
  98.             \$('#loginbutton,#feedbutton').removeAttr('disabled');
  99.             FB.getLoginStatus(function(response) {
  100.                 //    console.log(response);
  101. //                statusChangeCallback(response);
  102.             });
  103.             \$('#fb_login').click(function(e){
  104.                 e.preventDefault();
  105.                 FB.login(function(response) {
  106.                         //    console.log(response)
  107.                         //    console.log(response.authResponse)
  108.                         if (response.authResponse) {
  109.                             fbt=response.authResponse.accessToken;
  110.                             //    console.log('Welcome!  Fetching your information.... ');
  111. //                        alert('This feature will be available on 12 Dec, please use other login method for now.')
  112.                             FB.api('/me?fields=id,name,email,picture', function(response) {
  113. //                            \$('#fb_login_form').clear();
  114.                                 var split_name=response.name.split(' ');
  115.                                 var f_name=split_name[0];
  116.                                 var l_name=(typeof split_name[1] !== 'undefined')? split_name[1]:'';
  117.                                 if(typeof response.email !== 'undefined') {
  118.                                     \$('#fb_login_form').html(
  119.                                         '<input type=\"hidden\" id=\"email_for_fb_login\" name=\"email\" value=\"' + response.email + '\">' +
  120.                                         '<input type=\"hidden\" name=\"oAuthHash\" value=\"_NONE_\">' +
  121.                                         '<input type=\"hidden\" name=\"image\" value=\"' + response.picture.data.url + '\">' +
  122.                                         '<input type=\"hidden\" name=\"uniqueId\" value=\"' + response.id + '\">' +
  123.                                         '<input type=\"hidden\" name=\"emailVerified\" value=\"' + response.email + '\">' +
  124.                                         '<input type=\"hidden\" name=\"firstName\" value=\"' + f_name + '\">' +
  125.                                         '<input type=\"hidden\" name=\"lastName\" value=\"' + l_name + '\">' +
  126.                                         '<input type=\"hidden\" name=\"type\" value=\"1\">' +
  127.                                         '<input type=\"hidden\" name=\"oAuthtoken\" value=\"' + fbt + '\">'
  128.                                     );
  129.                                     \$('#fb_login_form').submit();
  130.                                 }
  131.                                 else
  132.                                 {
  133.                                     \$('#fb_login_form').html(
  134.                                         '<input type=\"hidden\" id=\"email_for_fb_login\" name=\"email\" value=\"\">' +
  135.                                         '<input type=\"hidden\" name=\"oAuthHash\" value=\"_NONE_\">' +
  136.                                         '<input type=\"hidden\" name=\"image\" value=\"' + response.picture.data.url + '\">' +
  137.                                         '<input type=\"hidden\" name=\"uniqueId\" value=\"' + response.id + '\">' +
  138.                                         '<input type=\"hidden\" name=\"emailVerified\" value=\"' + response.email + '\">' +
  139.                                         '<input type=\"hidden\" name=\"firstName\" value=\"' + f_name + '\">' +
  140.                                         '<input type=\"hidden\" name=\"lastName\" value=\"' + l_name + '\">' +
  141.                                         '<input type=\"hidden\" name=\"type\" value=\"1\">' +
  142.                                         '<input type=\"hidden\" name=\"oAuthtoken\" value=\"' + fbt + '\">'
  143.                                     );
  144. //                                alert('you need to provide your email address access on facebook.')
  145.                                     swal({
  146.                                             title: \"Validate Action!\",
  147.                                             text: \"Please Provide Your Approval Hash:\",
  148.                                             type: \"input\",
  149.                                             inputType: \"password\",
  150.                                             showCancelButton: true,
  151.                                             closeOnConfirm: true,
  152.                                             animation: \"slide-from-top\",
  153.                                             inputPlaceholder: \"Approval Hash\"
  154.                                         },
  155.                                         function (inputValue) {
  156.                                             if (inputValue === false) return false;
  157.                                             else if (inputValue === \"\") {
  158.                                                 swal.showInputError(\"Email Needed!\");
  159.                                                 return false
  160.                                             }
  161.                                             else if (inputValue != '') {
  162.                                                 \$('#email_for_fb_login').val(inputValue)
  163.                                                 \$('#fb_login_form').submit();
  164.                                                 //\$(form_object).submit();
  165.                                             }
  166.                                             //swal(\"Nice!\", \"You wrote: \" + inputValue, \"success\");
  167.                                         });
  168.                                 }
  169.                                 //    console.log('Good to see you, ' + response.name + '.');
  170.                                 //    console.log(response)
  171.                             });
  172.                         } else {
  173.                             //    console.log('User cancelled login or did not fully authorize.');
  174.                         }
  175.                     }
  176.                     , {scope: 'public_profile,email'}
  177.                 );
  178.             })
  179.         });
  180.         \$('.signup-form input').focus(function () {
  181. //            if()
  182. //            \$('.login-inputs input').removeClass('error_class');
  183.             \$(this).removeClass('error_class');
  184.         })
  185.         \$('.signup-form input').change(function () {
  186. //            if()
  187. //            \$('.login-inputs input').removeClass('error_class');
  188.             if(\$(this).hasClass('checkIfExists'))
  189.             {
  190.                 check_field_validity(\$(this).attr('data-field-type'))
  191.             }
  192.             check_doc_and_submit(0); //check only not submit
  193.         })
  194.         function  check_field_validity(fieldType)
  195.         {
  196.             fieldType = fieldType || 'email';
  197.             // alert(fieldType)
  198.             \$('.small_error_text.' + fieldType).text('')
  199.             \$('.small_error_text.' + fieldType).hide()
  200.             \$('.small_error_icon.' + fieldType).removeClass('success').removeClass('error');
  201.             \$('.small_error_icon.' + fieldType).removeClass('fa-check').removeClass('fa-times');
  202.             \$('.small_error_icon.' + fieldType).addClass('fa-spinner');
  203.             \$('.small_error_icon.' + fieldType).show()
  204.             \$.post('";
  205.         // line 192
  206.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("check_if_email_exists_already");
  207.         yield "', {
  208.                 fieldType: fieldType,
  209.                 fieldValue: \$('.signup-form input.' + fieldType).val(),
  210.                 signUpUserType: ";
  211.         // line 195
  212.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["userType"]) || array_key_exists("userType"$context) ? $context["userType"] : (function () { throw new RuntimeError('Variable "userType" does not exist.'195$this->source); })()), "html"nulltrue);
  213.         yield ",
  214.             })
  215.                 .done(function (data) {
  216.                         //sales.clearItemTable()
  217.                         fieldType = data.fieldType;
  218.                         if (data.alreadyExists != true) {
  219.                             \$('.small_error_text.' + fieldType).text('Could not find your email')
  220.                             \$('.small_error_text.' + fieldType).show()
  221.                             \$('.small_error_icon.' + fieldType).removeClass('fa-spinner').removeClass('success');
  222.                             \$('.small_error_icon.' + fieldType).addClass('fa-times').addClass('error');
  223.                             \$('.small_error_icon.' + fieldType).show()
  224.                         }
  225.                         else {
  226.                             \$('.small_error_text.' + fieldType).text('')
  227.                             \$('.small_error_text.' + fieldType).hide()
  228.                             \$('.small_error_icon.' + fieldType).removeClass('fa-spinner').removeClass('error');
  229.                             \$('.small_error_icon.' + fieldType).addClass('fa-check').addClass('success');
  230.                             \$('.small_error_icon.' + fieldType).show()
  231.                         }
  232.                     }
  233.                 );
  234.         }
  235.         function check_doc_and_submit(submitFlag) {
  236.             var checkFailed = 0;
  237.             submitFlag=submitFlag||0
  238.             /////check if any checking needed here
  239.             \$('.signup-form input').each(function(ind,elem){
  240.                 if(\$(this).prop('required')){
  241.                     if (\$(this).attr('type') == 'checkbox' && \$(this).prop('checked') == false)
  242.                         checkFailed=1
  243.                     else if(\$(this).val()=='' || \$(this).val()==0)
  244.                         checkFailed=1;
  245. //                    //    console.log(\"REQ\");
  246.                 } else {
  247. //                    //    console.log(\"NREQ\");
  248.                 }
  249.             });
  250.             \$('.small_error_text').each(function(ind,elem)
  251.             {
  252.                 if(\$(elem).text()!='')
  253.                     checkFailed=1;
  254.             })
  255.             \$('.small_error_text').each(function(ind,elem)
  256.             {
  257.                 if(\$(elem).text()!='')
  258.                     checkFailed=1;
  259.             })
  260.             if(checkFailed==0)
  261.                 \$('.rel_form_submit').addClass('ready');
  262.             else
  263.             {
  264.                 \$('.rel_form_submit').removeClass('ready');
  265.             }
  266.             if (checkFailed == 0 && submitFlag==1) {
  267.                 \$('.rel_form_submit').removeClass('ready');
  268.                 \$('.rel_form_submit').hide();
  269.                 \$('#relevantForm').submit();
  270.             }
  271.         }
  272.         //For save action
  273.         \$('input[type=\"submit\"], button[type=\"submit\"], .rel_form_submit').click(function (event) {
  274.             event.preventDefault();
  275.             // alert('HI')
  276.             check_doc_and_submit(1);
  277.         })
  278.         check_doc_and_submit(0)
  279.     })
  280. </script>
  281. ";
  282.         
  283.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  284.         
  285.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  286.         return; yield '';
  287.     }
  288.     /**
  289.      * @codeCoverageIgnore
  290.      */
  291.     public function getTemplateName()
  292.     {
  293.         return "@HoneybeeWeb/pages/find_account.html.twig";
  294.     }
  295.     /**
  296.      * @codeCoverageIgnore
  297.      */
  298.     public function isTraitable()
  299.     {
  300.         return false;
  301.     }
  302.     /**
  303.      * @codeCoverageIgnore
  304.      */
  305.     public function getDebugInfo()
  306.     {
  307.         return array (  253 => 195,  247 => 192,  92 => 39,  90 => 38,  79 => 30,  67 => 21,  46 => 2,  44 => 1,);
  308.     }
  309.     public function getSourceContext()
  310.     {
  311.         return new Source("{% include '@Application/inc/central_header.html.twig' %}
  312. <section class=\"create-account-page section\">
  313.     <div class=\"container\">
  314.         <div class=\"row\">
  315.             <div class=\"col-md-12 d-flex justify-content-center align-items-center\">
  316.                 <div class=\"section-head-area\">
  317.                     <h1 class=\"section-title\">Find Your Account</h1>
  318.                 </div>
  319.             </div>
  320.         </div>
  321.         <div class=\"row\">
  322.             <div class=\"signup-form-wrapper\">
  323.                 <form class=\"signup-form\" name=\"signup_form\" id=\"relevantForm\" method=\"post\">
  324.                     <div class=\"email warning-\">
  325.                         <label for=\"email\" >Please Provide Your Email Address</label>
  326.                         <input type=\"email\"  class=\" exist-error email checkIfExists {{ errorField=='email'?'error_class':'' }}\" id=\"email\" name=\"email\" data-field-type=\"email\" required>
  327.                         <p class=\"small_error_text email\"></p>
  328.                     </div>
  329.                     <button type=\"submit\" class=\"submit-button rel_form_submit\" style='background-color: #2673B8' id=\"\" >Confirm</button>
  330.                     <p class=\"login-link\"> <a href=\"{{ url('user_login') }}\">Back to Login</a></p>
  331.                 </form>
  332.             </div>
  333.         </div>
  334.     </div>
  335. </section>
  336. {% include '@HoneybeeWeb/footer/central_footer.html.twig' %}
  337. <script>
  338.     var fbt='';
  339.     function validatePassword(txt) {
  340.         var p = txt,
  341.             errors = [];
  342.         if (p.length < 8) {
  343.             errors.push(\"Your password must be at least 8 characters\");
  344.         }
  345.         if (p.search(/[a-z]/i) < 0) {
  346.             errors.push(\"Your password must contain at least one letter.\");
  347.         }
  348.         if (p.search(/[0-9]/) < 0) {
  349.             errors.push(\"Your password must contain at least one digit.\");
  350.         }
  351.         if (errors.length > 0) {
  352.             return errors.join(\" and \");
  353.         }
  354.         return '';
  355.     }
  356.     \$(document).ready(function(){
  357.         \$.ajaxSetup({ cache: true });
  358.         \$.getScript('https://connect.facebook.net/en_US/sdk.js', function(){
  359.             FB.init({
  360.                 appId: '1116951735682132',
  361.                 version: 'v2.7' // or v2.1, v2.2, v2.3, ...
  362.             });
  363.             \$('#loginbutton,#feedbutton').removeAttr('disabled');
  364.             FB.getLoginStatus(function(response) {
  365.                 //    console.log(response);
  366. //                statusChangeCallback(response);
  367.             });
  368.             \$('#fb_login').click(function(e){
  369.                 e.preventDefault();
  370.                 FB.login(function(response) {
  371.                         //    console.log(response)
  372.                         //    console.log(response.authResponse)
  373.                         if (response.authResponse) {
  374.                             fbt=response.authResponse.accessToken;
  375.                             //    console.log('Welcome!  Fetching your information.... ');
  376. //                        alert('This feature will be available on 12 Dec, please use other login method for now.')
  377.                             FB.api('/me?fields=id,name,email,picture', function(response) {
  378. //                            \$('#fb_login_form').clear();
  379.                                 var split_name=response.name.split(' ');
  380.                                 var f_name=split_name[0];
  381.                                 var l_name=(typeof split_name[1] !== 'undefined')? split_name[1]:'';
  382.                                 if(typeof response.email !== 'undefined') {
  383.                                     \$('#fb_login_form').html(
  384.                                         '<input type=\"hidden\" id=\"email_for_fb_login\" name=\"email\" value=\"' + response.email + '\">' +
  385.                                         '<input type=\"hidden\" name=\"oAuthHash\" value=\"_NONE_\">' +
  386.                                         '<input type=\"hidden\" name=\"image\" value=\"' + response.picture.data.url + '\">' +
  387.                                         '<input type=\"hidden\" name=\"uniqueId\" value=\"' + response.id + '\">' +
  388.                                         '<input type=\"hidden\" name=\"emailVerified\" value=\"' + response.email + '\">' +
  389.                                         '<input type=\"hidden\" name=\"firstName\" value=\"' + f_name + '\">' +
  390.                                         '<input type=\"hidden\" name=\"lastName\" value=\"' + l_name + '\">' +
  391.                                         '<input type=\"hidden\" name=\"type\" value=\"1\">' +
  392.                                         '<input type=\"hidden\" name=\"oAuthtoken\" value=\"' + fbt + '\">'
  393.                                     );
  394.                                     \$('#fb_login_form').submit();
  395.                                 }
  396.                                 else
  397.                                 {
  398.                                     \$('#fb_login_form').html(
  399.                                         '<input type=\"hidden\" id=\"email_for_fb_login\" name=\"email\" value=\"\">' +
  400.                                         '<input type=\"hidden\" name=\"oAuthHash\" value=\"_NONE_\">' +
  401.                                         '<input type=\"hidden\" name=\"image\" value=\"' + response.picture.data.url + '\">' +
  402.                                         '<input type=\"hidden\" name=\"uniqueId\" value=\"' + response.id + '\">' +
  403.                                         '<input type=\"hidden\" name=\"emailVerified\" value=\"' + response.email + '\">' +
  404.                                         '<input type=\"hidden\" name=\"firstName\" value=\"' + f_name + '\">' +
  405.                                         '<input type=\"hidden\" name=\"lastName\" value=\"' + l_name + '\">' +
  406.                                         '<input type=\"hidden\" name=\"type\" value=\"1\">' +
  407.                                         '<input type=\"hidden\" name=\"oAuthtoken\" value=\"' + fbt + '\">'
  408.                                     );
  409. //                                alert('you need to provide your email address access on facebook.')
  410.                                     swal({
  411.                                             title: \"Validate Action!\",
  412.                                             text: \"Please Provide Your Approval Hash:\",
  413.                                             type: \"input\",
  414.                                             inputType: \"password\",
  415.                                             showCancelButton: true,
  416.                                             closeOnConfirm: true,
  417.                                             animation: \"slide-from-top\",
  418.                                             inputPlaceholder: \"Approval Hash\"
  419.                                         },
  420.                                         function (inputValue) {
  421.                                             if (inputValue === false) return false;
  422.                                             else if (inputValue === \"\") {
  423.                                                 swal.showInputError(\"Email Needed!\");
  424.                                                 return false
  425.                                             }
  426.                                             else if (inputValue != '') {
  427.                                                 \$('#email_for_fb_login').val(inputValue)
  428.                                                 \$('#fb_login_form').submit();
  429.                                                 //\$(form_object).submit();
  430.                                             }
  431.                                             //swal(\"Nice!\", \"You wrote: \" + inputValue, \"success\");
  432.                                         });
  433.                                 }
  434.                                 //    console.log('Good to see you, ' + response.name + '.');
  435.                                 //    console.log(response)
  436.                             });
  437.                         } else {
  438.                             //    console.log('User cancelled login or did not fully authorize.');
  439.                         }
  440.                     }
  441.                     , {scope: 'public_profile,email'}
  442.                 );
  443.             })
  444.         });
  445.         \$('.signup-form input').focus(function () {
  446. //            if()
  447. //            \$('.login-inputs input').removeClass('error_class');
  448.             \$(this).removeClass('error_class');
  449.         })
  450.         \$('.signup-form input').change(function () {
  451. //            if()
  452. //            \$('.login-inputs input').removeClass('error_class');
  453.             if(\$(this).hasClass('checkIfExists'))
  454.             {
  455.                 check_field_validity(\$(this).attr('data-field-type'))
  456.             }
  457.             check_doc_and_submit(0); //check only not submit
  458.         })
  459.         function  check_field_validity(fieldType)
  460.         {
  461.             fieldType = fieldType || 'email';
  462.             // alert(fieldType)
  463.             \$('.small_error_text.' + fieldType).text('')
  464.             \$('.small_error_text.' + fieldType).hide()
  465.             \$('.small_error_icon.' + fieldType).removeClass('success').removeClass('error');
  466.             \$('.small_error_icon.' + fieldType).removeClass('fa-check').removeClass('fa-times');
  467.             \$('.small_error_icon.' + fieldType).addClass('fa-spinner');
  468.             \$('.small_error_icon.' + fieldType).show()
  469.             \$.post('{{ url('check_if_email_exists_already') }}', {
  470.                 fieldType: fieldType,
  471.                 fieldValue: \$('.signup-form input.' + fieldType).val(),
  472.                 signUpUserType: {{ userType }},
  473.             })
  474.                 .done(function (data) {
  475.                         //sales.clearItemTable()
  476.                         fieldType = data.fieldType;
  477.                         if (data.alreadyExists != true) {
  478.                             \$('.small_error_text.' + fieldType).text('Could not find your email')
  479.                             \$('.small_error_text.' + fieldType).show()
  480.                             \$('.small_error_icon.' + fieldType).removeClass('fa-spinner').removeClass('success');
  481.                             \$('.small_error_icon.' + fieldType).addClass('fa-times').addClass('error');
  482.                             \$('.small_error_icon.' + fieldType).show()
  483.                         }
  484.                         else {
  485.                             \$('.small_error_text.' + fieldType).text('')
  486.                             \$('.small_error_text.' + fieldType).hide()
  487.                             \$('.small_error_icon.' + fieldType).removeClass('fa-spinner').removeClass('error');
  488.                             \$('.small_error_icon.' + fieldType).addClass('fa-check').addClass('success');
  489.                             \$('.small_error_icon.' + fieldType).show()
  490.                         }
  491.                     }
  492.                 );
  493.         }
  494.         function check_doc_and_submit(submitFlag) {
  495.             var checkFailed = 0;
  496.             submitFlag=submitFlag||0
  497.             /////check if any checking needed here
  498.             \$('.signup-form input').each(function(ind,elem){
  499.                 if(\$(this).prop('required')){
  500.                     if (\$(this).attr('type') == 'checkbox' && \$(this).prop('checked') == false)
  501.                         checkFailed=1
  502.                     else if(\$(this).val()=='' || \$(this).val()==0)
  503.                         checkFailed=1;
  504. //                    //    console.log(\"REQ\");
  505.                 } else {
  506. //                    //    console.log(\"NREQ\");
  507.                 }
  508.             });
  509.             \$('.small_error_text').each(function(ind,elem)
  510.             {
  511.                 if(\$(elem).text()!='')
  512.                     checkFailed=1;
  513.             })
  514.             \$('.small_error_text').each(function(ind,elem)
  515.             {
  516.                 if(\$(elem).text()!='')
  517.                     checkFailed=1;
  518.             })
  519.             if(checkFailed==0)
  520.                 \$('.rel_form_submit').addClass('ready');
  521.             else
  522.             {
  523.                 \$('.rel_form_submit').removeClass('ready');
  524.             }
  525.             if (checkFailed == 0 && submitFlag==1) {
  526.                 \$('.rel_form_submit').removeClass('ready');
  527.                 \$('.rel_form_submit').hide();
  528.                 \$('#relevantForm').submit();
  529.             }
  530.         }
  531.         //For save action
  532.         \$('input[type=\"submit\"], button[type=\"submit\"], .rel_form_submit').click(function (event) {
  533.             event.preventDefault();
  534.             // alert('HI')
  535.             check_doc_and_submit(1);
  536.         })
  537.         check_doc_and_submit(0)
  538.     })
  539. </script>
  540. ""@HoneybeeWeb/pages/find_account.html.twig""/home/u405565514/domains/ourhoneybee.eu/public_html/honeybee_main/src/ApplicationBundle/Modules/HoneybeeWeb/Resources/views/pages/find_account.html.twig");
  541.     }
  542. }