var errorFild = [];
$.each(errorFild, function(key, value ) { req = []; req.push(key); if($('input[name="data['+key+']"]').length > 1){ $('input[name="data['+key+']"]').first().parent('div').append('
'); }else{ $('input[name="data['+key+']"]').parent('div').append('
'); } if($.inArray( 0, req )){ $('.content-wbs-forms').children('.alert.alert-danger').css('display','none'); } });
Array.prototype.diff = function(a) { return this.filter(function(i) {return a.indexOf(i) < 0;}); };
$(window).on("load",function() { var aGroupsNames = []; var i = 0; $("input[type=checkbox]:required").each(function(){ aGroupsNames[i] = $(this).attr("name"); i++; });
var aGroups = []; var a = 0; for (var i = 0; i < aGroupsNames.length - 1; i++) { if (aGroupsNames[i + 1] == aGroupsNames[i]) { aGroups[a] = aGroupsNames[i]; a++; } }
$('.submit-button').click(function() { var checked = []; var difference = [];
$.each(aGroups, function(index , value){ $.each($('input[name="' + value + '"]'),function(){ if($(this).prop('checked')){ checked.push(value); } }); });
difference = aGroups.diff( checked ); $.each(aGroups, function(index, value){ $.each($('input[name="' + value + '"]'), function(){ $(this).removeAttr("required");
}); });
if(difference.length > 0){ $.each(difference, function(index, value){ $.each($('input[name="' + value + '"]'), function(){ $(this).attr("required", true); // $(this).attr("title", 'You must check at least one checkbox in this group'); }); }); } }); });
window.onload=function(){ if(navigator.userAgent.indexOf('Safari')!= -1 && navigator.userAgent.indexOf('Chrome') == -1){
var cookies = document.cookie; if(top.location != document.location){ if(!cookies){ href = document.location.href; href = (href.indexOf('?')==-1)?href+'?':href+'&'; top.location.href = href+'reref='+encodeURIComponent(document.referrer); } } else { ts = new Date().getTime(); document.cookie='ts='+ts; rerefidx = document.location.href.indexOf('reref='); if(rerefidx != -1){ href = decodeURIComponent(document.location.href.substr(rerefidx+6)); window.location.replace(href); } } } };
var formId = "100"; $(document).on('submit', 'form[id=widgetForm' + formId + ']', function() { $(this).find('[type="submit"]').each(function(i, field) { $(field).attr('disabled', 'disabled'); $(field).text($(field).text() + '...'); }); });
// fixes for old access/* links var formWidgetId = "95"; var checkoutWidgetId = ""; var langForLink = "de"; if(formWidgetId || checkoutWidgetId) { $('a[href*="access/forgot-mode-choose"], a[href*="access/forgot-username"], a[href*="access/reset-password"]').each(function() { var lnk = $(this).attr('href'); var split = lnk.split('access/'); var params = split[1].split('?'); var parts = params[0].split('/'); if(!parts[1]) { parts[1] = "50047413"; } parts[2] = checkoutWidgetId ? 'checkout' : 'form'; parts[3] = checkoutWidgetId ? checkoutWidgetId : formWidgetId;
params[0] = parts.join('/'); split[1] = params.join('?');
parts = split[0].split('/'); if(langForLink && !(parts && parts[parts.length-2] && parts[parts.length-2].length == 2)) { split[0] = split[0] + langForLink + '/'; } $(this).attr('href', split.join('access/')); }); }
var errorFild = [];
$.each(errorFild, function(key, value ) { req = []; req.push(key); if($('input[name="data['+key+']"]').length > 1){ $('input[name="data['+key+']"]').first().parent('div').append('
'); }else{ $('input[name="data['+key+']"]').parent('div').append('
'); } if($.inArray( 0, req )){ $('.content-wbs-forms').children('.alert.alert-danger').css('display','none'); } });
Array.prototype.diff = function(a) { return this.filter(function(i) {return a.indexOf(i) < 0;}); };
$(window).on("load",function() { var aGroupsNames = []; var i = 0; $("input[type=checkbox]:required").each(function(){ aGroupsNames[i] = $(this).attr("name"); i++; });
var aGroups = []; var a = 0; for (var i = 0; i < aGroupsNames.length - 1; i++) { if (aGroupsNames[i + 1] == aGroupsNames[i]) { aGroups[a] = aGroupsNames[i]; a++; } }
$('.submit-button').click(function() { var checked = []; var difference = [];
$.each(aGroups, function(index , value){ $.each($('input[name="' + value + '"]'),function(){ if($(this).prop('checked')){ checked.push(value); } }); });
difference = aGroups.diff( checked ); $.each(aGroups, function(index, value){ $.each($('input[name="' + value + '"]'), function(){ $(this).removeAttr("required");
}); });
if(difference.length > 0){ $.each(difference, function(index, value){ $.each($('input[name="' + value + '"]'), function(){ $(this).attr("required", true); // $(this).attr("title", 'You must check at least one checkbox in this group'); }); }); } }); });
window.onload=function(){ if(navigator.userAgent.indexOf('Safari')!= -1 && navigator.userAgent.indexOf('Chrome') == -1){
var cookies = document.cookie; if(top.location != document.location){ if(!cookies){ href = document.location.href; href = (href.indexOf('?')==-1)?href+'?':href+'&'; top.location.href = href+'reref='+encodeURIComponent(document.referrer); } } else { ts = new Date().getTime(); document.cookie='ts='+ts; rerefidx = document.location.href.indexOf('reref='); if(rerefidx != -1){ href = decodeURIComponent(document.location.href.substr(rerefidx+6)); window.location.replace(href); } } } };
var formId = "107"; $(document).on('submit', 'form[id=widgetForm' + formId + ']', function() { $(this).find('[type="submit"]').each(function(i, field) { $(field).attr('disabled', 'disabled'); $(field).text($(field).text() + '...'); }); });
// fixes for old access/* links var formWidgetId = "102"; var checkoutWidgetId = ""; var langForLink = "de"; if(formWidgetId || checkoutWidgetId) { $('a[href*="access/forgot-mode-choose"], a[href*="access/forgot-username"], a[href*="access/reset-password"]').each(function() { var lnk = $(this).attr('href'); var split = lnk.split('access/'); var params = split[1].split('?'); var parts = params[0].split('/'); if(!parts[1]) { parts[1] = "50047413"; } parts[2] = checkoutWidgetId ? 'checkout' : 'form'; parts[3] = checkoutWidgetId ? checkoutWidgetId : formWidgetId;
params[0] = parts.join('/'); split[1] = params.join('?');
parts = split[0].split('/'); if(langForLink && !(parts && parts[parts.length-2] && parts[parts.length-2].length == 2)) { split[0] = split[0] + langForLink + '/'; } $(this).attr('href', split.join('access/')); }); }
var errorFild = [];
$.each(errorFild, function(key, value ) { req = []; req.push(key); if($('input[name="data['+key+']"]').length > 1){ $('input[name="data['+key+']"]').first().parent('div').append('
'); }else{ $('input[name="data['+key+']"]').parent('div').append('
'); } if($.inArray( 0, req )){ $('.content-wbs-forms').children('.alert.alert-danger').css('display','none'); } });
Array.prototype.diff = function(a) { return this.filter(function(i) {return a.indexOf(i) < 0;}); };
$(window).on("load",function() { var aGroupsNames = []; var i = 0; $("input[type=checkbox]:required").each(function(){ aGroupsNames[i] = $(this).attr("name"); i++; });
var aGroups = []; var a = 0; for (var i = 0; i < aGroupsNames.length - 1; i++) { if (aGroupsNames[i + 1] == aGroupsNames[i]) { aGroups[a] = aGroupsNames[i]; a++; } }
$('.submit-button').click(function() { var checked = []; var difference = [];
$.each(aGroups, function(index , value){ $.each($('input[name="' + value + '"]'),function(){ if($(this).prop('checked')){ checked.push(value); } }); });
difference = aGroups.diff( checked ); $.each(aGroups, function(index, value){ $.each($('input[name="' + value + '"]'), function(){ $(this).removeAttr("required");
}); });
if(difference.length > 0){ $.each(difference, function(index, value){ $.each($('input[name="' + value + '"]'), function(){ $(this).attr("required", true); // $(this).attr("title", 'You must check at least one checkbox in this group'); }); }); } }); });
window.onload=function(){ if(navigator.userAgent.indexOf('Safari')!= -1 && navigator.userAgent.indexOf('Chrome') == -1){
var cookies = document.cookie; if(top.location != document.location){ if(!cookies){ href = document.location.href; href = (href.indexOf('?')==-1)?href+'?':href+'&'; top.location.href = href+'reref='+encodeURIComponent(document.referrer); } } else { ts = new Date().getTime(); document.cookie='ts='+ts; rerefidx = document.location.href.indexOf('reref='); if(rerefidx != -1){ href = decodeURIComponent(document.location.href.substr(rerefidx+6)); window.location.replace(href); } } } };
var formId = "115"; $(document).on('submit', 'form[id=widgetForm' + formId + ']', function() { $(this).find('[type="submit"]').each(function(i, field) { $(field).attr('disabled', 'disabled'); $(field).text($(field).text() + '...'); }); });
// fixes for old access/* links var formWidgetId = "110"; var checkoutWidgetId = ""; var langForLink = "de"; if(formWidgetId || checkoutWidgetId) { $('a[href*="access/forgot-mode-choose"], a[href*="access/forgot-username"], a[href*="access/reset-password"]').each(function() { var lnk = $(this).attr('href'); var split = lnk.split('access/'); var params = split[1].split('?'); var parts = params[0].split('/'); if(!parts[1]) { parts[1] = "50047413"; } parts[2] = checkoutWidgetId ? 'checkout' : 'form'; parts[3] = checkoutWidgetId ? checkoutWidgetId : formWidgetId;
params[0] = parts.join('/'); split[1] = params.join('?');
parts = split[0].split('/'); if(langForLink && !(parts && parts[parts.length-2] && parts[parts.length-2].length == 2)) { split[0] = split[0] + langForLink + '/'; } $(this).attr('href', split.join('access/')); }); }