Add event to form to confirm open changes

This commit is contained in:
bergware
2021-06-04 20:08:18 +02:00
parent 1a3314660a
commit 35a0bdc231
@@ -692,7 +692,6 @@ $(function() {
e.preventDefault();
formHasUnsavedChanges=true;
}).on('submit',function(e){
e.preventDefault();
formHasUnsavedChanges=false;
});
$(window).on('beforeunload',function(e){if (formHasUnsavedChanges) return '';}); // note: the browser creates its own popup window and warning message