changeset 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 af65544e47e2
children be720d0473f6
files app/view/form/Probe.js app/view/widget/Netzbetreiber.js
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
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();
--- a/app/view/widget/Netzbetreiber.js	Wed Aug 31 15:56:07 2016 +0200
+++ b/app/view/widget/Netzbetreiber.js	Wed Aug 31 15:57:49 2016 +0200
@@ -17,6 +17,8 @@
     valueField: 'id',
     editable: this.editable || false,
     readOnly: this.readOnly,
+    isFormField: this.isFormField,
+    submitValue: this.submitValue,
     // Enable filtering of comboboxes
     queryMode: 'local',
     triggerAction: 'all',
@@ -35,6 +37,8 @@
             this.store.clearFilter();
         }
         this.callParent(arguments);
+        this.down('combobox').isFormField = false;
+        this.down('combobox').submitValue = false;
     },
 
     getValue: function() {

http://lada.wald.intevation.org