Reload the booking form when it is restored from the back-forward cache
After tapping "Sende" the submit button is locked to stop double bookings. If the guest then pressed Back, the browser could restore that snapshot with the button still locked and unusable. The form now reloads in that case, matching the manage-booking page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e3ba51b8e5
commit
72be52f06d
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user