diff app/controller/form/Messprogramm.js @ 1192:d57462b81444 schema-update

Set new field 'gemId' in messprogramm.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 07 Sep 2016 17:37:41 +0200
parents 7baaf2cd3f57
children
line wrap: on
line diff
--- a/app/controller/form/Messprogramm.js	Wed Aug 31 16:24:53 2016 +0200
+++ b/app/controller/form/Messprogramm.js	Wed Sep 07 17:37:41 2016 +0200
@@ -180,9 +180,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