<div id=”wf-form-container”></div><script>(function(){var container = document.createElement(“div”);container.className = “container”;container.style.maxWidth = “500px”;container.style.display=”none”;var css = [“https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta.3/css/bootstrap.min.css”, “https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css”, “https://use.fontawesome.com/releases/v5.0.13/css/all.css”, “http://css.linksita2017.com/manager/SBAdmin/css/form.css”, “http://css.linksita2017.com/manager/SBAdmin/css/lightbox.min.css” ];css.forEach(function(url){var link = document.createElement(‘link’);link.rel=”stylesheet”;link.href=url;document.head.appendChild(link);});var html = ‘<center><h3 class=”title”>COMPILA IL MODULO</h3></center>’;html += ‘<form method=”post” accept-charset=”utf-8″ role=”form” id=”wf_form_33929″ action=”/manager/inventory/get_form/bgood_xwatch?ref=%5B%5Bpubid%5D%5D”><div style=”display:none;”><input type=”hidden” name=”_method” value=”POST”/></div>’;html += ‘<input type=”hidden” name=”fingerprint” id=”fingerprint” value=””>’;html += ‘<input type=”hidden” name=”source_id” id=”source_id” value=”[[pubid]]”><div class=”form-group”> <label>Nome e Cognome</label> <input type=”text” name=”name” class=”form-control” placeholder=”Inserisci Nome e Cognome” required=”required”/> </div><div class=”form-group”> <label>Telefono (Meglio Cellulare)</label> <input type=”text” name=”phone” class=”form-control” placeholder=”Inserisci il tuo numero di telefono” required=”required”/></div><div class=”form-group”> <label>Indirizzo e n. civico</label> <input type=”text” name=”address” class=”form-control” placeholder=”ES. Via Aldo moro, 130″ required=”required”/></div><div class=”form-row”> <div class=”form-group col-md-8″> <label>Città</label> <input type=”text” name=”city” class=”form-control” placeholder=”ES. Milano” required=”required”/> </div> <div class=”form-group col-md-4″> <label>CAP</label> <input type=”text” name=”zipcode” class=”form-control” placeholder=”ES. 94112″ required=”required”/> </div> </div> <div class=”form-group”> <label>E-mail (Facoltativo)</label> <input type=”email” name=”email” class=”form-control” placeholder=”Inserisci il tuo indirizzo e-mail”/></div><div class=”form-row offer-selection” data-images=\'[]\’ data-default-img=\’/manager/upload/products/image/2891_be749ecc89a26dc5ee3c41aa051ad7bc_1534148754.png\’> <div class=”col-auto text-center d-flex align-items-center” data-toggle=”lightbox”> <img data-jslghtbx style=”max-width:100%;max-height:80px;” src=”/manager/upload/products/image/2891_be749ecc89a26dc5ee3c41aa051ad7bc_1534148754.png”> </div> <div class=”form-group col text-center”> <label>Scegli un\’offerta</label> <select name=”quantity” class=”form-control” required=”required”><option value=”1″ selected=”selected”>1 xPower Watch 59 €</option><option value=”2″>2 xPower Watch 79 €</option><option value=”3″>3 xPower Watch 99 €</option><option value=”1s”>1 xPower Watch + 1 Sound 79 €</option><option value=”2s”>2 xPower Watch + 2 Sound 109 €</option><option value=”3s”>3 xPower Watch + 3 Sound 139 €</option></select> </div> </div><div class=”form-row extra_multiple_options first-element” data-images=\'{“nero”:false,”argento”:false,”ororosa”:false}\’><div class=”form-group col”> <label><b>Colore <span class=”extra_multiple_count”>1</span></b></label> <select name=”extra_options[colore][]” class=”form-control”><option value=”nero”>Nero</option><option value=”argento”>Argento</option><option value=”ororosa”>Oro Rosa</option></select> </div> <div class=”col-auto text-center d-flex align-items-center multiple-option-img” data-toggle=”lightbox”> <img data-jslghtbx style=”max-width:100%;max-height:80px” src=”https://iframe.worldfilia.net/manager/upload/products/image/default.jpeg”> </div> </div><div class=”form-group”> <label>Come preferisci pagare?</label> <select name=”payment_type” class=”form-control”><option value=”C”>In contanti al corriere</option></select></div><div class=”form-group”> <div class=”text-center”> <span style=” color: black;padding: 4px;background: #ffc205;font-weight: bold;border-radius: 5px;”>&nbsp;<i class=”fa fa-truck”></i> La spedizione è gratis! </span> </div></div> <div class=”form-group”> <label>Note per il corriere</label> <input type=”text” name=”notes” class=”form-control” rows=”2″ placeholder=”ES. Citofonare al Sig. Rossi”/></div>’;html += ‘<center><div id=”info-privacy”><small>Cliccando “Completa l\’acquisto” confermi di aver preso visione <a href=”https://www.blubenessere.sm/privacy-policy/” target=”_blank”>dell\’informativa sulla privacy</a>.</small></div><button id=”submit-button” class=”btn btn-lg btn-warning new-sbm-btn” type=”submit”>Completa l\’acquisto</button></center>’;html += ‘</form>’;container.innerHTML = html;document.querySelector(“#wf-form-container”).appendChild(container);document.querySelector(“#wf-form-container”).removeAttribute(“id”);var form = document.querySelector(“#wf_form_33929”);form.addEventListener(“submit”,function(e){e.preventDefault();var form = this;form.classList.add(“loading”);var data = new FormData(form);var req = new XMLHttpRequest();req.open(“POST”, atob(“aHR0cHM6Ly9pZnJhbWUud29ybGRmaWxpYS5uZXQvbWFuYWdlci9pbnZlbnRvcnkvYnV5L2Jnb29kX3h3YXRjaC5qc29u”), false);req.onreadystatechange = function(a,b,c){form = document.querySelector(“#wf_form_33929”);form.classList.remove(“loading”);if (this.status == 200){var resp = (this.response);var data = JSON.parse(resp);if (data.status === ‘success’) location.href=data.thankyou_url;else{var errors = data.errors;if(Object.keys(errors).length>0){last_error_element = false;for(var key in errors){error = errors[key];for(var k in error){message = error[k];break;} if(form.querySelectorAll(“[name=”+key+”]”).length>0){form_element = form.querySelector(“[name=”+key+”]”);form_group = form_element.closest(“.form-group”);if(form_group.querySelector(“.invalid-feedback”) === null){form_group.innerHTML += ‘<div class=”invalid-feedback”></div>’;} form_group.querySelector(“.invalid-feedback”).innerText = message;form_element = form.querySelector(“[name=”+key+”]”);form_element.classList.add(‘is-invalid’);last_error_element = form_element;} else if(typeof message ===’string’){alert(message);} else console.log(message);} if(last_error_element) last_error_element.scrollIntoView({behavior: ‘smooth’});document.querySelectorAll(“.is-invalid”).forEach(function(el){el.addEventListener(“change”,function(e){this.classList.remove(“is-invalid”);});});}}} else{console.log(“error”);}};req.send(data);});function wfMultipleOptions(){var form = document.querySelector(“#wf_form_33929”);var field = form.querySelector(“[name=quantity]”);val = parseInt(field.value);if(form.querySelectorAll(“.extra_multiple_options”).length > 0){elements = form.querySelectorAll(“.extra_multiple_options.first-element”);document.querySelectorAll(“.extra_multiple_options:not(.first-element)”).forEach(function(elem){elem.parentNode.removeChild(elem);});elements.forEach(function(el){appendnext = el;for(var i=1;i<=(val-1);i++){newel = el.cloneNode(true);newel.classList.remove(“first-element”);appendnext.after(newel);count = newel.querySelector(“.extra_multiple_count”);newel.querySelector(“.extra_multiple_count”).innerHTML = (i+1);appendnext = newel;}});} var parent = field.closest(‘.offer-selection’);var images = JSON.parse(parent.dataset.images);var value = field.value;if(images[value]) parent.querySelector(“img”).setAttribute(“src”,images[value]);else parent.querySelector(“img”).setAttribute(“src”,parent.dataset.defaultImg);} form = document.querySelector(“#wf_form_33929”);form.querySelector(“[name=quantity]”).addEventListener(“change”,wfMultipleOptions);setTimeout(function(){wfMultipleOptions();container.style.display=”block”;form.querySelectorAll(“[name^=extra_options]”).forEach(function(element){element.dispatchEvent(new Event(‘change’,{‘bubbles’: true}));});},100);document.body.addEventListener(‘change’, function(e){if(e.target.parentNode.querySelectorAll(“[name^=extra_options]”).length>0){el = e.target.parentNode.querySelector(“[name^=extra_options]”);var parent = el.closest(‘.extra_multiple_options’);var images = JSON.parse(parent.dataset.images);var value = el.value;if(images[value]){parent.querySelector(“.multiple-option-img”).classList.remove(“force-hidden”);parent.querySelector(“.multiple-option-img img”).setAttribute(“src”,images[value]);} else parent.querySelector(“.multiple-option-img”).classList.remove(“force-hidden”);}});script = document.createElement(‘script’);script.onload = function (){var lightbox = new Lightbox();lightbox.load();};script.src = ‘https://iframe.worldfilia.net/manager/SBAdmin/js/lightbox.min.js’;document.head.appendChild(script);if(typeof Fingerprint2 !== “function”){script = document.createElement(‘script’);script.onload = function (){new Fingerprint2().get(function(result, components){if(result) document.querySelector(“#wf_form_33929 #fingerprint”).value = result;});};script.src = “https://cdnjs.cloudflare.com/ajax/libs/fingerprintjs2/1.5.1/fingerprint2.min.js”;document.head.appendChild(script);} else{new Fingerprint2().get(function(result, components){if(result) document.querySelector(“#wf_form_33929 #fingerprint”).value = result;});}})();</script>