diff app/view/form/Probe.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 ec2b10d81343
children 390dabbf27ed
line wrap: on
line diff
--- a/app/view/form/Probe.js	Fri Oct 14 16:06:21 2016 +0200
+++ b/app/view/form/Probe.js	Fri Oct 14 18:34:19 2016 +0200
@@ -131,9 +131,10 @@
                                 hidden: true
                             }, {
                                 xtype: 'netzbetreiber',
-                                name: 'netzbetreiberId',
                                 editable: false,
                                 readOnly: true,
+                                isFormField: false,
+                                submitValue: false,
                                 fieldLabel: 'Netzbetreiber',
                                 margin: '0, 5, 5, 5',
                                 width: '35%',
@@ -372,8 +373,8 @@
             return;
         }
         var mstStore = Ext.data.StoreManager.get('messstellen');
+        var mstId = mstStore.getById(probeRecord.get('mstId'));
         if (!probeRecord.get('owner')) {
-            var mstId = mstStore.getById(probeRecord.get('mstId'));
             var laborMstId = mstStore.getById(probeRecord.get('laborMstId'));
             if (laborMstId) {
                 laborMstId = laborMstId.get('messStelle');
@@ -405,6 +406,7 @@
             });
             this.down('messstellelabor').setValue(items.getAt(0));
         }
+        this.down('netzbetreiber').setValue(mstId.get('netzbetreiberId'));
     },
 
     setMediaDesk: function(record) {
@@ -485,7 +487,7 @@
         this.down('cbox[name=baId]').clearWarningOrError();
         this.down('chkbox[name=test]').clearWarningOrError();
         this.down('cbox[name=probenartId]').clearWarningOrError();
-        this.down('cbox[name=netzbetreiberId]').clearWarningOrError();
+        this.down('netzbetreiber').clearWarningOrError();
         this.down('cbox[name=erzeugerId]').clearWarningOrError();
         this.down('cbox[name=umwId]').clearWarningOrError();
         this.down('datetime[name=probeentnahmeBeginn]').clearWarningOrError();

http://lada.wald.intevation.org