[Lada-commits] [PATCH 2 of 5] Load and update the correct orte form

Wald Commits scm-commit at wald.intevation.org
Tue Mar 17 16:05:41 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1426604663 -3600
# Node ID 5b5bba1d8e6a9ca76459e0234ed9d9c54de2d6a6
# Parent  f4969c71654afde18cb461d13af8f03dd5a00988
Load and update the correct orte form.

diff -r f4969c71654a -r 5b5bba1d8e6a app/controller/form/Ort.js
--- a/app/controller/form/Ort.js	Tue Mar 17 16:02:33 2015 +0100
+++ b/app/controller/form/Ort.js	Tue Mar 17 16:04:23 2015 +0100
@@ -27,7 +27,7 @@
     },
 
     save: function(button) {
-        var formPanel = button.up('form');
+        var formPanel = button.up('ortform');
         var data = formPanel.getForm().getFieldValues(true);
         for (var key in data) {
             formPanel.getForm().getRecord().set(key, data[key]);
@@ -35,9 +35,7 @@
         formPanel.getForm().getRecord().save({
             success: function(record, response) {
                 var json = Ext.decode(response.response.responseText);
-                if (response.action !== 'create' &&
-                    json &&
-                    json.success) {
+                if (json) {
                     button.setDisabled(true);
                     button.up('toolbar').down('button[action=discard]')
                         .setDisabled(true);


More information about the Lada-commits mailing list