[Lada-commits] [PATCH 3 of 7] Set the netzbetreiber and set netzbetreiber widget to a non-form field

Wald Commits scm-commit at wald.intevation.org
Wed Aug 31 16:25:05 CEST 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1472651869 -7200
# Branch schema-update
# Node ID 287ce20bb1cbd7f64d0199ddd3dcffc3a4c3395c
# Parent  af65544e47e259b355212d8d1f3598a2de60320d
Set the netzbetreiber and set netzbetreiber widget to  a non-form field.

diff -r af65544e47e2 -r 287ce20bb1cb app/view/form/Probe.js
--- 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();
diff -r af65544e47e2 -r 287ce20bb1cb app/view/widget/Netzbetreiber.js
--- 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() {


More information about the Lada-commits mailing list