Da oggi è online sul nostro sito il nuovo scadenzario relativo ai mesi aprile – luglio 2019. Per consultarlo clicca sul simbolo
in alto a destra, e cerca le scadenze sul calendario.
Da oggi è online sul nostro sito il nuovo scadenzario relativo ai mesi aprile – luglio 2019. Per consultarlo clicca sul simbolo
in alto a destra, e cerca le scadenze sul calendario.
var jQ = jQuery.noConflict();
jQ(document).ready(function(){
function viewInfoIcon(status, form) { switch(String(status)) { case 'loading': form.find('.loading-img').attr('src', 'https://studiobracciali.com/wp-content/plugins/wp-mailup/images/indicator.white.gif'); form.find('.loading-img').css('display', ''); break; case 'info': form.find('.loading-img').attr('src', 'https://studiobracciali.com/wp-content/plugins/wp-mailup/images/question.gif'); form.find('.loading-img').css('display', ''); break; default: } }
jQ("body").on("submit", "form.subscribeForm", function(e){ e.preventDefault(); e.stopImmediatePropagation(); var selectedForm = jQuery(this); var token = selectedForm.find('.wpmailup-subscribe').val(); var sub_email = selectedForm.find('.sub-email').val(); var sub_phone = selectedForm.find('.sub-phone').val();
var sub_date = '';
var sub_ext1 = '';
var sub_ext2 = '';
var sub_ext3 = '';
var sub_ext4 = '';
var sub_ext5 = '';
var csvFldValues = ''; var csvFldNames = '';
//var csvFldValues = ''; /*if(sub_ext1 && sub_ext2) {*/ //csvFldValues = sub_ext1 + ';' + sub_ext2 + ';' + sub_ext3 + ';' + sub_ext4 + ';' + sub_ext5; /*} else if(sub_ext1) { csvFldValues = sub_ext1; } else { csvFldValues = sub_ext2; }*/
var listId = '3'; var groupId = ''; var confirmReq = 'false'; var subUrl = 'f7c2h.emailsp.com/frontend/xmlSubscribe.aspx/?source=generic';
/* validate form */
if(!(sub_email.match(/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,63})$/))) { selectedForm.find('.show-response').html('Indirizzo mail non valido'); viewInfoIcon('info', selectedForm); return false; }
/* Check terms and conditions have been checked */ var termsAccept = ''; if(jQ('.terms-confirm').is(':checked') == false) { selectedForm.find('.show-response').html('Dai il consenso alle condizioni d\'uso'); viewInfoIcon('info', selectedForm); return false; } else { termsAccept = jQ('.terms-confirm').val(); } /* Check other terms and conditions have been checked */ var terms2Accept = ''; terms2Accept = 'yes';
var form_values = { "Email":sub_email, "List":listId, "sms":sub_phone, "Group":groupId, "Confirm":confirmReq, "csvFldNames":csvFldNames, "csvFldValues":csvFldValues, "retCode":"1", "token":token, "subsUrl":subUrl, "termsAccept":termsAccept, "terms2Accept":terms2Accept }
selectedForm.find('.loading-img').css('display', ''); viewInfoIcon('loading', selectedForm); selectedForm.find('.show-response').html('Sending request...'); jQ.post('https://studiobracciali.com/wp-content/plugins/wp-mailup/subscribe.php', form_values, function(returned_data){ switch(Number(returned_data)) { case 0: selectedForm.find('.show-response').html('Ok, ora sei iscritto alla nostra newsletter!
'); break; case 1: selectedForm.find('.show-response').html('Errore generico '); break; case 2: selectedForm.find('.show-response').html('Indirizzo mail non valido'); break; case 3: selectedForm.find('.show-response').html('Utente già iscritto!'); break; case 10: selectedForm.find('.show-response').html('Dai il consenso alle condizioni d\'uso'); break; case 11: selectedForm.find('.show-response').html('dai il consenso ai termini d\'uso aggiuntivi'); break; case -1011: /* here generic message is displayed instead of a detailed message, which can be misleading for subscribers */ selectedForm.find('.show-response').html('Errore generico '); /*jQ('.show-response').html('IP address validation is required. Please check this page');*/
break; default: break; } viewInfoIcon('info', selectedForm); }); return false; }); });