diff app/controller/form/Messprogramm.js @ 1217:4270da0f7d3b

Merged branch schema-update into default.
author Tom Gottfried <tom@intevation.de>
date Fri, 14 Oct 2016 18:34:19 +0200
parents a24de34d6423
children e8dd06450f2c
line wrap: on
line diff
--- a/app/controller/form/Messprogramm.js	Fri Oct 14 16:06:21 2016 +0200
+++ b/app/controller/form/Messprogramm.js	Fri Oct 14 18:34:19 2016 +0200
@@ -201,9 +201,12 @@
     save: function(button) {
         var formPanel = button.up('form');
         var data = formPanel.getForm().getFieldValues(true);
+        var orte = Ext.data.StoreManager.get('orte');
+        var gemId = orte.getById(data['ortId']).get('gemId');
         for (var key in data) {
             formPanel.getForm().getRecord().set(key, data[key]);
         }
+        formPanel.getForm().getRecord().set('gemId', gemId);
         if (!formPanel.getForm().getRecord().get('letzteAenderung')) {
             formPanel.getForm().getRecord().data.letzteAenderung = new Date();
         }

http://lada.wald.intevation.org