[Lada-commits] [PATCH] update the record according to form when sending similar Ort in Ortserstellung

Wald Commits scm-commit at wald.intevation.org
Fri Feb 3 09:35:33 CET 2017


# HG changeset patch
# User Maximilian Krambach <mkrambach at intevation.de>
# Date 1486110930 -3600
# Node ID 2d92be45df9e9cc7786692951106a22d92aa7c2c
# Parent  9b50bf4c218b1d90cec84a1c5f52f2a73d219087
update the record according to form when sending similar Ort in Ortserstellung

diff -r 9b50bf4c218b -r 2d92be45df9e app/view/form/Ortserstellung.js
--- a/app/view/form/Ortserstellung.js	Thu Feb 02 19:04:02 2017 +0100
+++ b/app/view/form/Ortserstellung.js	Fri Feb 03 09:35:30 2017 +0100
@@ -267,14 +267,13 @@
     saveOrt: function() {
         var this_panel = this.up('panel');
         var form = this_panel.getForm();
+        var record = form.getRecord();
         var data = form.getFieldValues(true);
         for (var key in data) {
-            form.getRecord().set(key, data[key]);
+            record.set(key, data[key]);
         }
-        this_panel.record.set('letzteAenderung', 0);
-        this_panel.record.set('id', null);
-        this_panel.record.set('netzbetreiberId', Lada.netzbetreiber[0]);
-        this_panel.record.save({
+        record.set('netzbetreiberId', Lada.netzbetreiber[0]);
+        record.save({
             success: function(record, response) {
                 var newOrtId;
                 var ozw = this_panel.up().parentWindow;
@@ -364,4 +363,4 @@
         // TODO: this is a stub
      }
 
-});
+e);


More information about the Lada-commits mailing list