diff --git a/themes/hotel-reservation-theme/js/order-opc.js b/themes/hotel-reservation-theme/js/order-opc.js index 5855055de..854f90fbb 100644 --- a/themes/hotel-reservation-theme/js/order-opc.js +++ b/themes/hotel-reservation-theme/js/order-opc.js @@ -118,14 +118,12 @@ $(document).ready(function() validateCustomerGuestDetailForm(); } $(document).on('click', '.submit-guest-details', function(e) { - e.preventDefault(); if ($('#customer_guest_detail').prop('checked')) { validateCustomerGuestDetailForm(); + e.preventDefault(); if ($('#customer_guest_detail_form').find('.form-error').length == 0) { $('#customer_guest_detail_form').get(0).submit(); } - } else { - $('#customer_guest_detail_form').get(0).submit(); } });