changeset 680:31fc4f94f98f

merged
author Dustin Demuth <dustin@intevation.de>
date Tue, 24 Mar 2015 12:15:39 +0100
parents 60a3e9809ea4 (current diff) a24db43b13b5 (diff)
children f373446325b4
files
diffstat 2 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/form/Probe.js	Tue Mar 24 12:07:35 2015 +0100
+++ b/app/controller/form/Probe.js	Tue Mar 24 12:15:39 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);
--- a/app/model/Probe.js	Tue Mar 24 12:07:35 2015 +0100
+++ b/app/model/Probe.js	Tue Mar 24 12:15:39 2015 +0100
@@ -22,7 +22,13 @@
     }, {
         name: 'test'
     }, {
-        name: 'netzbetreiberId'
+        name: 'netzbetreiberId',
+        serialize: function(value) {
+            if (value === '') {
+                return null;
+            }
+            return value;
+        }
     }, {
         name: 'mstId'
     }, {
@@ -36,7 +42,13 @@
     }, {
         name: 'media'
     }, {
-        name: 'umwId'
+        name: 'umwId',
+        serialize: function(value) {
+            if (value === '') {
+                return null;
+            }
+            return value;
+        }
     }, {
         name: 'probeentnahmeBeginn',
         type: 'date',

http://lada.wald.intevation.org