diff app/controller/form/Probe.js @ 678:a24db43b13b5

Set record dirty flag to false if commit failed.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 24 Mar 2015 10:44:36 +0100
parents fdaabab6f4cc
children 14ac75f80ba1
line wrap: on
line diff
--- a/app/controller/form/Probe.js	Tue Mar 24 10:40:01 2015 +0100
+++ b/app/controller/form/Probe.js	Tue Mar 24 10:44:36 2015 +0100
@@ -53,7 +53,9 @@
                 button.setDisabled(true);
                 button.up('toolbar').down('button[action=discard]')
                     .setDisabled(true);
-                formPanel.getForm().loadRecord(formPanel.getForm().getRecord());
+                var rec = formPanel.getForm().getRecord();
+                rec.dirty = false;
+                formPanel.getForm().loadRecord(rec);
                 var json = response.request.scope.reader.jsonData;
                 if (json) {
                     formPanel.setMessages(json.errors, json.warnings);

http://lada.wald.intevation.org