changeset 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 394c12b7bb21
children 31fc4f94f98f
files app/controller/form/Probe.js
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
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