Modif pour RAZ les autres choix de mode de livraison, autres que le choix en cours.
This commit is contained in:
@@ -109,5 +109,20 @@
|
||||
initMapCnc();
|
||||
});
|
||||
|
||||
$("#form-cart-delivery").off('submit').submit(function(ev) {
|
||||
if ($('[delivery-mode=cnc]').is(':checked')) {
|
||||
|
||||
// On RAZ les éventuelles sélections préalables.
|
||||
if (typeof $('input[name=pdr-choosen-day]:checked').val() != 'undefined')
|
||||
$('input[name=pdr-choosen-day]:checked').prop("checked", false);
|
||||
if (typeof $('input[name=lps-choosen-day]:checked').val() != 'undefined')
|
||||
$('input[name=lps-choosen-day]:checked').prop("checked", false);
|
||||
|
||||
if ($('input[name=cnc-choosen-day]:checked').length === 0) {
|
||||
alert("Veuillez choisir un point Click and Collect.");
|
||||
ev.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -85,27 +85,19 @@
|
||||
});
|
||||
|
||||
$("#form-cart-delivery").off('submit').submit(function(ev) {
|
||||
if ($('[delivery-mode=lps]').is(':checked')
|
||||
&&
|
||||
$('input[name=lps-choosen-day]:checked').length === 0) {
|
||||
alert("Veuillez choisir un jour de livraison.");
|
||||
ev.preventDefault();
|
||||
}
|
||||
if ($('[delivery-mode=lps]').is(':checked')) {
|
||||
|
||||
if ($('[delivery-mode=pdr]').is(':checked')
|
||||
&&
|
||||
$('input[name=pdr-choosen-day]:checked').length === 0) {
|
||||
alert("Veuillez choisir un point de retrait.");
|
||||
ev.preventDefault();
|
||||
}
|
||||
// On RAZ les éventuelles sélections préalables.
|
||||
if (typeof $('input[name=cnc-choosen-day]:checked').val() != 'undefined')
|
||||
$('input[name=cnc-choosen-day]:checked').prop("checked", false);
|
||||
if (typeof $('input[name=pdr-choosen-day]:checked').val() != 'undefined')
|
||||
$('input[name=pdr-choosen-day]:checked').prop("checked", false);
|
||||
|
||||
if ($('[delivery-mode=cnc]').is(':checked')
|
||||
&&
|
||||
$('input[name=cnc-choosen-day]:checked').length === 0) {
|
||||
alert("Veuillez choisir un point Click and Collect.");
|
||||
ev.preventDefault();
|
||||
if ($('input[name=lps-choosen-day]:checked').length === 0) {
|
||||
alert("Veuillez choisir un jour de livraison.");
|
||||
ev.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -215,4 +215,20 @@
|
||||
initMaps();
|
||||
}
|
||||
|
||||
$("#form-cart-delivery").off('submit').submit(function(ev) {
|
||||
if ($('[delivery-mode=pdr]').is(':checked')) {
|
||||
|
||||
// On RAZ les éventuelles sélections préalables.
|
||||
if (typeof $('input[name=cnc-choosen-day]:checked').val() != 'undefined')
|
||||
$('input[name=cnc-choosen-day]:checked').prop("checked", false);
|
||||
if (typeof $('input[name=lps-choosen-day]:checked').val() != 'undefined')
|
||||
$('input[name=lps-choosen-day]:checked').prop("checked", false);
|
||||
|
||||
if ($('input[name=pdr-choosen-day]:checked').length === 0) {
|
||||
alert("Veuillez choisir un point de retrait.");
|
||||
ev.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user