diff --git a/application/views/pages/includes/booking-form-en.php b/application/views/pages/includes/booking-form-en.php index 6fd2fd7..b1b3330 100755 --- a/application/views/pages/includes/booking-form-en.php +++ b/application/views/pages/includes/booking-form-en.php @@ -214,6 +214,14 @@ $('#sendBooking').prop('disabled', true).val('Sending...'); }); + // Back button can restore this page from the browser cache with the + // submit button still locked - reload so the guest gets a fresh, usable form. + $(window).on('pageshow', function(e){ + if(e.originalEvent && e.originalEvent.persisted){ + window.location.reload(); + } + }); + $('#booking_time').change(function(){ if($('#booking_time').val() != ''){ $('#isTimeSelectedBtn').prop('disabled', false); diff --git a/application/views/pages/includes/booking-form-hu.php b/application/views/pages/includes/booking-form-hu.php index 0e2a642..8b0ebe0 100755 --- a/application/views/pages/includes/booking-form-hu.php +++ b/application/views/pages/includes/booking-form-hu.php @@ -213,6 +213,14 @@ $('#sendBooking').prop('disabled', true).val('Küldés...'); }); + // Back button can restore this page from the browser cache with the + // submit button still locked - reload so the guest gets a fresh, usable form. + $(window).on('pageshow', function(e){ + if(e.originalEvent && e.originalEvent.persisted){ + window.location.reload(); + } + }); + $('#booking_time').change(function(){ if($('#booking_time').val() != ''){ $('#isTimeSelectedBtn').prop('disabled', false); diff --git a/application/views/pages/includes/booking-form-no.php b/application/views/pages/includes/booking-form-no.php index 86eb3b7..15f4efa 100755 --- a/application/views/pages/includes/booking-form-no.php +++ b/application/views/pages/includes/booking-form-no.php @@ -213,6 +213,14 @@ if (is_array($services) && count($services) > 0) { $('#sendBooking').prop('disabled', true).val('Sender...'); }); + // Back button can restore this page from the browser cache with the + // submit button still locked - reload so the guest gets a fresh, usable form. + $(window).on('pageshow', function(e){ + if(e.originalEvent && e.originalEvent.persisted){ + window.location.reload(); + } + }); + $('#booking_time').change(function(){ if($('#booking_time').val() != ''){ $('#isTimeSelectedBtn').prop('disabled', false);