1 2function make_good(i){ 3 4 if (i=="form-checkbox-b2c"|| i=="form-checkbox-b2b"){ 5 e=$("."+i); 6 7 e.parent().parent().parent().find('.info .form-group-info').css('display','flex'); 8 e.parent().parent().parent().find('.info .form-group-error').css('display','none'); 9 e.parent().parent().parent().find('.info-text-err').css('display','none'); 10 }else{ 11 e=$(i); 12 e.addClass('good'); 13 e.removeClass('notgood'); 14 if (e.attr("id") && e.attr("id").indexOf("0")>0) { 15 dd=e.attr("id").replace("0",""); $("#"+dd).addClass('good'); 16 $("#"+dd).removeClass('notgood'); 17 e=$("#"+dd).parent(); console.log(dd); console.log(e); 18 } 19 20 if (e.parent().children('.form-group-field')){ 21 e.parent().children('.form-group-field').find('span.form-group-info ').css('display','flex'); 22 e.parent().children('.form-group-field').find('span.form-group-error ').css('display','none'); 23 e.parent().parent().children('.form-group-field-answer').children('.form-group-field-text').css('opacity','0'); 24 e.parent().parent().children('.form-group-field-answer').children('.form-group-field-text').removeClass('get-error-field'); 25 } 26 27 if (e.parent().parent().children('.form-group-field')){ 28 e.parent().parent().children('.form-group-field').find('span.form-group-info ').css('display','flex'); 29 e.parent().parent().children('.form-group-field').find('span.form-group-error ').css('display','none'); 30 e.parent().parent().children('.form-group-field-text').css('opacity','0'); 31 e.parent().parent().children('.form-group-field-text').removeClass('get-error-field'); 32 33 if (e.parent().parent().children('.form-group-field').children('.form-group-field-text')){ 34 e.parent().parent().children('.form-group-field').children('.form-group-field-text').css('opacity','0'); 35 e.parent().parent().children('.form-group-field').children('.form-group-field-text').removeClass('get-error-field'); 36 } 37 } 38 39 if (e.parent().parent().parent().children('.form-group-field')) { 40 e.parent().parent().parent().children('.form-group-field').find('span.form-group-info ').css('display','flex'); 41 e.parent().parent().parent().children('.form-group-field').find('span.form-group-error ').css('display','none'); 42 e.parent().parent().parent().children('.form-group-field-text').css('opacity','0'); 43 e.parent().parent().parent().children('.form-group-field-text').removeClass('get-error-field'); 44 } 45 46 }} 47function make_bad(i){ 48 49 if (i=="form-checkbox-b2c" || i=="form-checkbox-b2b"){ 50 e=$("."+i); 51 e.parent().parent().parent().find('.info .form-group-info').css('display','none'); 52 e.parent().parent().parent().find('.info .form-group-error').css('display','flex'); 53 e.parent().parent().parent().find('.info-text-err').css('display','flex'); 54 } else { 55 e=$(i); 56 e.addClass('notgood'); 57 e.removeClass('good'); 58 if (e.attr("id") && e.attr("id").indexOf("0")>0) { 59 dd=e.attr("id").replace("0",""); $("#"+dd).addClass('notgood'); 60 $("#"+dd).removeClass('good'); 61 e=$("#"+dd).parent(); console.log(dd); console.log(e); 62 } 63 64 if (e.parent().children('.form-group-field')){ 65 e.parent().children('.form-group-field').find('span.form-group-info ').css('display','none'); 66 e.parent().children('.form-group-field').find('span.form-group-error ').css('display','flex'); 67 e.parent().parent().children('.form-group-field-answer').children('.form-group-field-text').css('opacity','1'); 68 e.parent().parent().children('.form-group-field-answer').children('.form-group-field-text').addClass('get-error-field'); 69 } 70 71 if (e.parent().parent().children('.form-group-field')){ 72 e.parent().parent().children('.form-group-field').find('span.form-group-info ').css('display','none'); 73 e.parent().parent().children('.form-group-field').find('span.form-group-error ').css('display','flex'); 74 e.parent().parent().children('.form-group-field-text').css('opacity','1'); 75 e.parent().parent().children('.form-group-field-text').addClass('get-error-field');/* 76 77 if (e.parent().parent().children('.form-group-field').children('.form-group-field-text')){ 78 $("#person_f").parent().parent().children('.form-group-field').children('.form-group-field-text').css('opacity','1'); 79 e.parent().parent().children('.form-group-field').children('.form-group-field-text').addClass('get-error-field'); 80 } */ 81 } 82 83 if (e.parent().parent().parent().children('.form-group-field')) { 84 e.parent().parent().parent().children('.form-group-field').find('span.form-group-info ').css('display','none'); 85 e.parent().parent().parent().children('.form-group-field').find('span.form-group-error ').css('display','flex'); 86 e.parent().parent().parent().children('.form-group-field-text').css('opacity','1'); 87 e.parent().parent().parent().children('.form-group-field-text').addClass('get-error-field'); 88 } 89 } 90} 91function make_clear(i){ 92 93 if ($(i).attr("id").indexOf("0")>0) { 94 dd=$(i).attr("id").replace("0",""); 95 $("#"+dd).remove('notgood'); 96 $("#"+dd).removeClass('good'); 97 e=$("#"+dd).parent(); console.log(e); 98 } 99 e=$(i).parent(); 100 e.removeClass("get-error-field"), 101 $(this).removeClass('notgood'), 102 e.parent().children('.form-group-field').find('span.form-group-info ').css('display','flex'), 103 e.parent().children('.form-group-field').find('span.form-group-error ').css('display','none'), 104 e.parent().children('.form-group-field-text').css('opacity','0'), 105 e.parent().children('.form-group-field-text').removeClass('get-error-field') 106 107} 108function form_step_next(i){ 109 var n=i+1; 110 $('.card-'+n).removeClass("hides"); 111 $('.card-'+i).removeClass("shows"); 112 $('.card-'+i).addClass("hides"); 113 $('.card-'+n).addClass("shows"); 114 $("#progressbar li#step"+i).addClass("active done"); 115 $("#progressbar li#step"+n).addClass("active"); 116} 117 118var euroCountryEn = [ 119 'Albania', 'Andorra', 'Armenia', 'Austria', 'Azerbaijan', 'Belgium', 'Bosnia and Herzegovina', 'Bulgaria', 120 'Croatia', 'Cyprus', 'Czech Republic', 'Denmark', 'Estonia', 'Faroe Islands', 'Finland', 'France', 'Metropolitan', 121 'Georgia', 'Germany', 'Greece', 'Greenland', 'Hungary', 'Iceland', 'Ireland', 'Italy', 'Latvia', 'Liechtenstein', 122 'Lithuania', 'Luxembourg', 'Macedonia', 'Malta', 'Moldova', 'Republic of Monaco', 'Montenegro', 'Netherlands', 123 'Norway', 'Poland', 'Portugal', 'Romania', 'San Marino', 'Serbia', 'Slovak Republic', 'Slovenia', 'Spain', 124 'Spain (Canary Islands)', 'Sweden', 'Switzerland', 'United Kingdom', 125 126 'ÐлбаниÑ', 'ÐндоÑÑа', 'ÐÑмениÑ', 'ÐвÑÑÑиÑ', 'ÐзеÑбайджан', 'ÐелÑгиÑ', 'ÐоÑÐ½Ð¸Ñ Ð¸ ÐеÑÑеговина', 'ÐолгаÑиÑ', 127 'ХоÑваÑиÑ', 'ÐипÑ', 'Ð§ÐµÑ Ð¸Ñ', 'ÐаниÑ', 'ÐÑÑониÑ', 'ФаÑеÑÑкие оÑÑÑова', 'ФинлÑндиÑ', 'ФÑанÑиÑ', 'ÐеÑÑополиÑен', 128 'ÐÑÑзиÑ', 'ÐеÑманиÑ', 'ÐÑеÑиÑ', 'ÐÑенландиÑ', 'ÐенгÑиÑ', 'ÐÑландиÑ', 'ÐÑландиÑ', 'ÐÑалиÑ', 'ÐаÑвиÑ', 'ÐÐ¸Ñ ÑенÑÑейн', 129 'ÐиÑва', 'ÐÑкÑембÑÑг', 'ÐакедониÑ', 'ÐалÑÑа', 'Ðолдова', 'РеÑпÑблика Ðонако', 'ЧеÑногоÑиÑ', 'ÐидеÑÐ
129»Ð°Ð½Ð´Ñ', 130 'ÐоÑвегиÑ', 'ÐолÑÑа', 'ÐоÑÑÑгалиÑ', 'Ð ÑмÑниÑ', 'Сан-ÐаÑино', 'СеÑбиÑ', 'СловаÑÐºÐ°Ñ Ð ÐµÑпÑблика', 'СловениÑ', 'ÐÑпаниÑ', 131 'ÐÑÐ¿Ð°Ð½Ð¸Ñ (ÐанаÑÑкие оÑÑÑова)', 'ШвеÑиÑ', 'ШвейÑаÑиÑ', 'ÐеликобÑиÑаниÑ', 132] 133 134var americanCountryEn = [ 135 'United States', 'Canada', 'Mexico', 'Curaçao', 'Puerto Rico', 'Bermuda', 'Saint Kitts and Nevis', 136 137 'СоединеннÑе ШÑаÑÑ', 'Ðанада', 'ÐекÑика', 'ÐÑÑаÑао', 'ÐÑÑÑÑо-Рико', 'ÐеÑмÑдÑ', 'СенÑ-ÐиÑÑ Ð¸ ÐевиÑ' 138] 139 140var arabianCountry = [ 141 'United Arab Emirates', 'Oman', 'Qatar', 'Kuwait', 'Bahrain', 'India', 'Morocco', 142 'Australia', 'Egypt', 'Argentina', 'South Africa', 'Tunisia', 'Turkey', 143 144 'ÐбÑединеннÑе ÐÑабÑкие ÐмиÑаÑÑ', 'Ðман', 'ÐаÑаÑ', 'ÐÑвейÑ', 'ÐÐ°Ñ Ñейн', 'ÐаÑокко', 145 'ÐндиÑ', 'ÐвÑÑÑалиÑ', 'ÐгипеÑ', 'ÐÑгенÑина', 'Ð®Ð¶Ð½Ð°Ñ ÐÑÑика', 'ТÑниÑ', 'ТÑÑÑиÑ' 146] 147 148function once(fn, context) { 149 var result; 150 151 return function() { 152 if(fn) { 153 result = fn.apply(context || this, arguments); 154 fn = null; 155 } 156 157 return result; 158 }; 159} 160 161$(document).ready(function(){ 162 163 var pageLocationPath = window.location.pathname; 164 165 $('#country_f').change(function() { 166 if ($(this).val()=="ÐÑбеÑиÑе ÑÑÑанÑ"||$(this).val()=="0") { 167 $('#country_f').css('color','rgba(60, 60, 59, 0.54)'); 168 } else { 169 $('#country_f').css('color','#000000'); 170 } 171 }); 172 173 $('#home_country').change(function() { 174 if ($(this).val()=="ÐÑбеÑиÑе ÑÑÑанÑ"||$(this).val()=="0") { 175 $('#home_country').css('color','rgba(60, 60, 59, 0.54)'); 176 } else { 177 $('#home_country').css('color','#000000'); 178 } 179 180 document.querySelector('#redirect').style.display = 'none'; 181 document.querySelector('#redirectus').style.display = 'none'; 182 document.querySelector('#redirectara').style.display = 'none'; 183 document.querySelector('#next11').style.display = 'none'; 184 185 if (euroCountryEn.indexOf($(this).val()) !== -1) { 186 document.querySelector('#redirect').style.display = 'flex'; 187 }else if (americanCountryEn.indexOf($(this).val()) !== -1){ 188 document.querySelector('#redirectus').style.display = 'flex'; 189 }else if (arabianCountry.indexOf($(this).val()) !== -1){ 190 document.querySelector('#redirectara').style.display = 'flex'; 191 }else { 192 document.querySelector('#next11').style.display = 'flex'; 193 } 194 }); 195 196 var current_fs, next_fs, previous_fs; 197 198 $(".modalCloseprev").click(function(){ 199 current_fs=$(".card:visible").data('id'); 200 console.log(current_fs); 201 if (current_fs==11 ||current_fs==1) { 202 location.reload(); 203 } else { 204 form_step_prev(current_fs-1); 205 } 206 207 /* current_fs = $(this).parent(); 208 previous_fs = $(this).parent().prev(); 209 */ 210 211 /* 212 next_fs = $(this).parent().parent().parent().next(); 213 214 $(current_fs).removeClass("shows"); 215 $(previous_fs).addClass("shows"); 216 217 $("#progressbar li").eq($(".card").index(previous_fs)).removeClass("done"); 218 $("#progressbar li").eq($(".card").index(current_fs)).removeClass("active"); 219 */ 220 /* current_fs.animate({}, { 221 step: function() { 222 223 current_fs.css({ 224 'display': 'none', 225 'position': 'relative' 226 }); 227 228 previous_fs.css({ 229 'display': 'block' 230 }); 231 } 232 }); */ 233 }); 234 235}); 236 237function form_step_prev(i){ 238 for (t = 14; t > i; t--) { 239 var n=i-1; 240 $('.card-'+t).addClass("hides"); 241 $('.card-'+t).removeClass("shows"); 242 $('.card-'+i).addClass("shows"); 243 $('.card-'+i).removeClass("hides"); 244 $("#progressbar li#step"+t).removeClass("active"); 245 $("#progressbar li#step"+t).removeClass("done"); 246 $("#progressbar li#step"+i).removeClass("done"); 247 $("#progressbar li#step"+i).addClass("active"); 248 } 249} 250 251$(document).keyup(function(t) { 252 253 $("#infomir_contact_form_b2c .form-checkbox-b2c label").click(function(){ 254 var checkedLast = $( this ).closest('.home-form').find(".form-checkbox-container input:checked").length; 255 if(checkedLast == 0) { 256 make_bad('form-checkbox-b2c'); 257 } else { 258 make_good('form-checkbox-b2c'); 259 } 260 });
261 262 $("#infomir_contact_form .form-checkbox-b2b label").click(function(){ 263 var checkedLast = $( this ).closest('.product-form').find(".form-checkbox-container input:checked").length; 264 if(checkedLast == 0) { 265 make_bad('form-checkbox-b2b'); 266 } else { 267 make_good('form-checkbox-b2b'); 268 } 269 }); 270 271 var key = t.which; 272 if(key == 13) { // the enter key code 273 $("#openModalForm button:visible").not("#next9").not("#next13").click(); 274 return false; 275 } 276 277}); 278 279$(document).ready(function() { 280 281 $("#progressbar li.step0").each(function () { 282 $(this).click(function(e){ 283 if ($(this).hasClass("done")){ 284 form_step_prev($(this).data("id")); 285 } 286 }); 287 }); 288 289 const input = document.querySelector("#phone_f"); 290 const iti = window.intlTelInput(input, { 291 separateDialCode: true, 292 initialCountry: "auto", 293 geoIpLookup: (callback) => { 294 fetch("https://ipinfo.io/json?token=8e1c2e51c6b872") 295 .then((res) => res.json()) 296 .then((data) => callback(data.country)) 297 .catch(() => callback("UK")); 298 }, 299 loadUtils: () => import("https://cdn.jsdelivr.net/npm/[email protected]/build/js/utils.js"), 300 validationNumberType: "MOBILE", 301 hiddenInput: (telInputName) => ({ 302 phone: "phone", 303 country: "country_code" 304 }), 305 }); 306 307 $("form#infomir_contact_form_b2c, form#infomir_contact_form").each(function(e, o) { 308 console.log("full"); 309 var a = (o = $(o)).attr("action"); 310 var error=[]; 311 var data={}; 312 function d(e) { 313 switch (!0) { 314 case (e = $(e)).is("select"): 315 return "" == e.val() || "ÐÑбеÑиÑе ÑÑÑанÑ"==e.val()|| null==e.val() || 0==e.val()|| /^[\s]+$/.test(e.val()); 316 317 case e.is('[type="email"]'): 318 return !/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e.val()); 319 case e.is('[name="mac[]"]'): 320 return "" == e.val() || parseInt(e.val().length) < parseInt("17"); 321 case e.is('[name="serial[]"]'): 322 return "" == e.val() || parseInt(e.val().length) < parseInt("13"); 323 case e.is('[name="maggg"]'): 324 return "" == e.val() || parseInt(e.val().length) < parseInt("13"); 325 case e.is('[type="number"]'): 326 return "" == e.val() || parseInt(e.val()) < parseInt(1) || parseInt(e.val()) > parseInt(e.attr("max")) || /[(a-zA-Z)]/.test(e.val()); 327 case e.is('[type="phone"]'): 328 return "" == e.val() ||/(_)/.test(e.val()); 329 default: 330 return "" == e.val() || "ÐÑбеÑиÑе ÑÑÑанÑ"==e.val()|| "0"==e.val()|| null==e.val() || /^[\s]+$/.test(e.val()) 331 } 332 return error 333 } 334 335 function check_el(e) { 336 if (d(e)) { 337 id=e.attr("id"); 338 make_bad("#"+id); 339 return true; 340 } else { 341 id=e.attr("id"); 342 make_good("#"+id); 343 return false; 344 } 345 } 346 function c(e, a) { 347 var n = {}; 348 switch (!0) { 349 case (a = $(a)).is(":radio"): 350 a.is(":checked") && (n[a.attr("name")] = a.val()); 351 break; 352 case a.is('[type="number"]'): 353 n[a.attr("name")] = a.val(); 354 break; 355 default: 356 n[a.attr("name")] = a.val() 357 } 358 return n 359 } 360 var l = $("input,textarea,select", o), 361 i = l.filter('[required="required"]'), 362 n = $('button[type="submit"]', o); 363 next1 = $('#next1', o); 364 next2 = $('#next2', o); 365 next3 = $('#next3', o); 366 next4 = $('#next4', o); 367 next5 = $('#next5', o); 368 next6 = $('#next6', o); 369 next7 = $('#next7', o); 370 next8 = $('#next8', o); 371 next9 = $('#next9', o); 372 next10 = $('#next10', o); 373 next11 = $('#next11', o); 374 next12 = $('#next12', o); 375 next13 = $('#next13', o); 376 377 $('#country_f').change(function() { 378 379 $('#quantity_w').css('display','none'); 380 381 382 if (americanCountryEn.indexOf($(this).val()) !== -1){ 383 $('#shop_link').attr('href', 'https://us.infomir.store/product-category/wholesale-stb?utm_source=http://infomir.eu&utm_medium=referral&utm_campaign=contact_form') 384 $('#quantity_w').css('display','block'); 385 $('#next1').css('display','none'); 386 } else if (euroCountryEn.indexOf($(this).val()) !== -1){ 387 $('#shop_link').attr('href', 'https://infomir.store/product-category/wholesale-stb?utm_source=http://infomir.eu&utm_medium=referral&utm_campaign=contact_form') 388 $('#quantity_w').css('display','block'); 389 $('#next1').css('display','none'); 390 } else if (arabianCountry.indexOf($(this).val()) !== -1){ 391 $('#shop_link').attr('href', 'https://mena.infomir.store/product-category/wholesale-stb?utm_source=http://infomir.eu &utm_medium=referral&utm_campaign=contact_form') 392 $('#quantity_w').css('display','block'); 393 $('#next1').css('display','none'); 394 } else { 395 $('#shop_link').css('display','none'); 396 $('#next1').css('display','block'); 397 } 398 }); 399 400 $('#quantity_f').change(function() { 401 402 $('#shop_link').css('display','none'); 403 $('#next1').css('display','block'); 404 405 setTimeout(function() { 406 data['quantity']=$('#quantity_f').val(); 407 408 if ( $('#quantity_f').val() !== '100+') { 409 $('#shop_link').css('display','flex'); 410 $('#next1').css('display','none'); 411 } 412 } , 500); 413 }); 414 415 416 if (-1 !== (t = n.find(i).map(function(e, a) { 417 var n = d(a); 418 return n && ($(a.parentNode).children(".info-text-err").display("flex")), n 419 }).get()).indexOf(!0)) return; 420 next2.unbind("click").click(function(e){
421 if ($('.form-checkbox-container-b input:checked').length==0) { 422 $(".card-1").find(".form-group-field-text").css("opacity","1"); 423 } else { 424 $(".card-1").find(".form-group-field-text").css("opacity","0"); 425 form_step_next(2); 426 } 427 }); 428 429 next3.unbind("click").click(function(e){ 430 check_el($("#name_f")) || form_step_next(3); 431 }); 432 next4.unbind("click").click(function(e){ 433 $('#home_country').css('color','rgba(60, 60, 59, 0.54)'); 434 $('#country_f').css('color','rgba(60, 60, 59, 0.54)'); 435 $("#namelast").val( $("#name_f").val() ); 436 437 check_el($("#email_f")) || form_step_next(4); 438 }); 439 next1.unbind("click").click(function(e){ 440 form_step_next(1); 441 // if ($("#country_f0").val()!=$("#country_f").val()) { 442 // make_bad('#country_f'); 443 // } else { 444 // if (!check_el($("#country_f0"))) { 445 // $("#countrylast").val($("#country_f0").val()); 446 // $("#countrylast0").val($("#country_f0").val()); 447 // form_step_next(1); 448 // action=$('#country_f').attr('data'); 449 // if (!$("#phone_f").val()) { 450 // if (action.length==3) { 451 // $('#phone_f').mask('+999 (999) 999-9999',{autoclear: false}); 452 // $('#phonelast').mask('+999 (999) 999-9999',{autoclear: false}); 453 // } else if (action.length==2) { 454 // $('#phone_f').mask('+99 (999) 999-9999',{autoclear: false}); 455 // $('#phonelast').mask('+99 (999) 999-9999',{autoclear: false}); 456 // } else{ $('#phone_f').mask('+9 (999) 999-9999',{autoclear: false}); 457 // $('#phonelast').mask('+9 (999) 999-9999',{autoclear: false}); 458 // } 459 // $("#phone_f").val('+'+action); 460 // $("#phone_f").trigger('input') 461 // } 462 // } 463 // } 464 }); 465 next5.unbind("click").click(function(e){ 466 $("#emaillast").val($("#email_f").val()); 467 $("#countrylast").val( $("#country_f0").val() ); 468 $("#countrylast0").val( $("#country_f0").val() ); 469 action = $('#country_f').attr('data'); 470 console.log( 'test - ' + $("#country_f0").val() ) 471 $("#phone_f").val(iti.getNumber()); 472 check_el($("#phone_f")) || form_step_next(5); 473 }); 474 next6.unbind("click").click(function(e){ 475 if ($("#person_f00").val()!=$("#person_f0").val()) { 476 make_bad('#person_f0'); 477 } else { 478 if (!check_el($("#person_f00"))) { 479 form_step_next(6); 480 $("#personlast0").val($("#person_f00").val()); 481 $("#personlast").val($("#person_f00").val()); 482 } 483 } 484 }); 485 next7.unbind("click").click(function(e){ 486 check_el($("#company_f")) || form_step_next(7); 487 }); 488 next8.unbind("click").click(function(e){ 489 if (!check_el($("#comment_f"))) { 490 form_step_next(8);$('ul#progressbar').addClass('hidden');$('.modalCloseprev').hide(); 491 } 492 }); 493 next9.unbind("click").click(function(e){ 494 $("#next9").attr('disabled', true); 495 data["maggg"]=""; 496 error.length=0; 497 if ($('.form-checkbox-b2c input:checked').length==0) { 498 error.push('1'); 499 make_bad('form-checkbox-b2c'); 500 } else { 501 $('.form-checkbox-b2c input:checked').each(function () { 502 data["maggg"]= 503 (data["maggg"]==""?"" : data["maggg"]+"; " ) + $(this).val(); 504 make_good('form-checkbox-b2c'); 505 }); 506 $('.form-check-row').parent().find('.info-text-err').css('display', 'none'); 507 } 508 console.log($('.form-checkbox-b2c input:checked').length); 509 data['subs']=$("#subs2").val(); 510 511 if (check_el($("#namelast"))) { 512 error.push('1');} else {data['name']=$("#namelast").val(); 513 } 514 if (check_el($("#emaillast"))) { 515 error.push('1');} else {data['email']=$("#emaillast").val(); 516 } 517 if (check_el($("#phonelast"))) { 518 error.push('1');} else {data['phonelast']=$("#phonelast").val(); 519 } 520 if (check_el($("#personlast0"))) { 521 error.push('1');} else {data['personlast']=$("#personlast").val(); 522 } 523 if (check_el($("#companylast"))) { 524 error.push('1');} else {data['companylast']=$("#companylast").val(); 525 } 526 if (check_el($("#countrylast0"))) { 527 error.push('1');} else {data['countrylast']=$("#countrylast").val(); 528 } 529 if (check_el($("#commentlast"))) { 530 error.push('1');} else {data['comment']=$("#commentlast").val(); 531 } 532 533 //if ($("#personlast0").val()!=$("#personlast").val()) {error.push('1'); make_bad('#personlast');} 534 if ($("#countrylast0").val()!=$("#countrylast").val()) { 535 error.push('1'); make_bad('#countrylast'); 536 } 537 538 if (error.length==0) { 539 data["act"]="new_form_b"; 540 $.ajax({
541 type: "POST", 542 url: "/ajax.php", 543 cache: 0, 544 data:data, 545 error: function(oe) { 546 $("#next9").attr('disabled', false); 547 }, 548 success: function(oe) { 549 window.dataLayer = window.dataLayer || []; 550 window.dataLayer.push({'event':'send_new_form_business'}); 551 if (typeof fbq === 'function') { 552 fbq('track', 'Lead', {content_name: 'Solutions Form Submission'}); 553 } 554 setTimeout(function() { 555 $(".card-last-step").removeClass('shows'); 556 $(".card-last-step").addClass('hides'); 557 $(".card-thanks-b2b").addClass('shows'); 558 $(".card-thanks-b2b").removeClass('hides'); 559 } , 500); 560 561 console.log(oe); 562 } 563 }); 564 } else { 565 $("#next9").attr('disabled', false); 566 } 567 }); 568 569 next10.unbind("click").click(function(e){ 570 form_step_next(10); 571 }); 572 next11.unbind("click").click(function(e){ 573 if ($("#home_country0").val()!=$("#home_country").val()) { 574 make_bad('#home_country'); 575 } else { 576 if (!check_el($("#home_country0"))) { 577 form_step_next(11); 578 $("#homecountrylast").val($("#home_country0").val()); 579 $("#homecountrylast0").val($("#home_country0").val()); 580 } 581 } 582 }); 583 next12.unbind("click").click(function(e){ 584 $("#homeemaillast").val($("#home_email").val()); 585 $('#home_country').css('color','rgba(60, 60, 59, 0.54)'); 586 $('#country_f').css('color','rgba(60, 60, 59, 0.54)'); 587 check_el($("#home_email")) || form_step_next(12); 588 $('.modalCloseprev').hide(); 589 $('ul#progressbar').addClass('hidden'); 590 }); 591 592 next13.unbind("click").click(function(e){ 593 $("#next13").attr('disabled', true); 594 data["maggg"]=""; 595 error.length=0; 596 if ($('.form-checkbox-b2c input:checked').length<=0) { 597 error.push('1'); 598 make_bad('form-checkbox-b2c'); 599 } else { 600 $('.form-checkbox-b2c input:checked').each(function () { 601 data["maggg"] = (data["maggg"]==""?"" : data["maggg"]+"; ") + $(this).val(); 602 }); 603 console.log('no error'); 604 make_good('form-checkbox-b2c'); 605 } 606 607 data['subs']=$("#subs2").val(); 608 if (check_el($("#homeemaillast"))) { 609 error.push('1'); 610 } else { 611 data['email']=$("#homeemaillast").val(); 612 } 613 if (check_el($("#quantitylast"))) { 614 error.push('1'); 615 } else { 616 data['quantity']=$("#quantitylast").val(); 617 } 618 if (check_el($("#homecountrylast0"))) { 619 error.push('1'); 620 } else { 621 data['country']=$("#homecountrylast").val(); 622 } 623 if ($("#homecountrylast0").val()!=$("#homecountrylast").val()) { 624 error.push('1'); 625 make_bad('#homecountrylast'); 626 } 627 if (error.length==0) { 628 console.log(data); 629 data["act"]="new_form"; 630 $.ajax({
631 type: "POST", 632 url: "/ajax.php", 633 cache: 0, 634 data: data, 635 error: function(oe) { 636 $("#next13").attr('disabled', false); 637 }, 638 success: function(oe) { 639 window.dataLayer = window.dataLayer || []; 640 window.dataLayer.push({'event':'send_new_form_personal'}); 641 if (typeof fbq === 'function') { 642 fbq('track', 'Lead', {content_name: 'Solutions Form Submission'}); 643 } 644 setTimeout(function() { 645 $(".card-last-step").removeClass('shows'); 646 $(".card-last-step").addClass('hides'); 647 $(".card-thanks-b2c").addClass('shows'); 648 $(".card-thanks-b2c").removeClass('hides'); 649 } ,500); 650 } 651 }) 652 } else { 653 $("#next13").attr('disabled', false); 654 } 655 }); 656 n.unbind("click").click(function(e) { 657 e.preventDefault(); 658 var a = $(this); 659 a.addClass("load"); 660 var s = [], 661 t = i.map(function(e, a) { 662 var n = d(a); 663 return n && s.push(a.parentNode), n 664 }).get(); 665 setTimeout(function() { 666 if (a.removeClass("load"), $.each(s, function() { 667 console.log("3"), 668 $(this).parent().siblings('.form-group-field-text').css('opacity','1'), 669 $(this).parent().siblings('.form-group-field-text p:first-child ').css('display','none'), 670 $(this).parent().siblings('.form-group-field-text p:last-child ').css('display','flex') 671 672 673 }), 674 -1 === t.indexOf(!0)) { 675 var n = {}; 676 $.each(l.map(c).get(), function(e, a) { 677 $.each(a, function(e, a) { 678 n[e] = a 679 }) 680 }); 681 var e = o.serialize(); 682 683 /* $.ajax({
684 type: "POST", 685 url: "/ajax.php", 686 cache: !1, 687 data: e, 688 success: function(e) { 689 $(o).html('<div class="clear"></div><div class="correct_message"><p></p><p>СпаÑибо, Ð²Ð°Ñ Ð·Ð°Ð¿ÑÐ¾Ñ Ð¿ÑинÑÑ!</p><p>СÑÑлка Ð´Ð»Ñ Ð·Ð°Ð³ÑÑзки оÑпÑавлена на ÑказаннÑÑ Ð¿Ð¾ÑÑÑ.</p></div>') 690 } 691 }); */ 692 693 } 694 }, 2e3) 695 696 }), 697 698 i.unbind("focus").focus(function(e) { 699 id=$(this).attr("id"); 700 make_good("#"+id); 701 702 }).change(function(e) { 703 704 id=$(this).attr("id"); 705 make_good("#"+id); 706 707 if (!d(this)) { 708 id=$(this).attr("id"); 709 make_good("#"+id); 710 711 } 712 }) 713 }) 714 715 const phoneFull = iti.getNumber(); 716 717});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.