Fixes issue 9295: Reset confirmOnChanges flag when user clicks OK
authorIván Perdomo <ivan.perdomo@openbravo.com>
Tue, 02 Jun 2009 14:45:23 +0200
changeset 3949 dfeb47c4102d
parent 3948 c5903be34525
child 3950 aae58ee55cac
Fixes issue 9295: Reset confirmOnChanges flag when user clicks OK
web/js/utils.js
--- a/web/js/utils.js	Tue Jun 02 14:20:50 2009 +0200
+++ b/web/js/utils.js	Tue Jun 02 14:45:23 2009 +0200
@@ -336,8 +336,12 @@
 		var hasUserChanges = typeof top.appFrame.isUserChanges == 'undefined' ? false : top.appFrame.isUserChanges;
 		if (form.inpLastFieldChanged && (hasUserChanges || isButtonClick || isTabClick)) { // if the inpLastFieldChanged exists and there is a user change
 			var autoSave = true;		
-			if (promptConfirmation)
+			if (promptConfirmation) {
 				autoSave = showJSMessage(25);
+				if(typeof top.appFrame.confirmOnChanges != 'undefined' && autoSave) {
+					top.appFrame.confirmOnChanges = false;
+				}
+			}
 			if (autoSave) {
 				if(form.autosave) {
 					form.autosave.value = 'Y';