diff app/view/form/Probe.js @ 1183:287ce20bb1cb schema-update

Set the netzbetreiber and set netzbetreiber widget to a non-form field.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 31 Aug 2016 15:57:49 +0200
parents 1be581a403b5
children
line wrap: on
line diff
--- a/app/view/form/Probe.js	Wed Aug 31 15:56:07 2016 +0200
+++ b/app/view/form/Probe.js	Wed Aug 31 15:57:49 2016 +0200
@@ -123,9 +123,10 @@
                                 hidden: true
                             }, {
                                 xtype: 'netzbetreiber',
-                                name: 'netzbetreiberId',
                                 editable: false,
                                 readOnly: true,
+                                isFormField: false,
+                                submitValue: false,
                                 fieldLabel: 'Netzbetreiber',
                                 margin: '0, 5, 5, 5',
                                 width: '35%',
@@ -364,8 +365,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');
@@ -397,6 +398,7 @@
             });
             this.down('messstellelabor').setValue(items.getAt(0));
         }
+        this.down('netzbetreiber').setValue(mstId.get('netzbetreiberId'));
     },
 
     setMediaDesk: function(record) {
@@ -477,7 +479,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