diff app/controller/form/Messung.js @ 693:817524db4017

Readonly was missing
author Dustin Demuth <dustin@intevation.de>
date Thu, 26 Mar 2015 15:54:50 +0100
parents aedf0709af92
children d6ef146e1a9f
line wrap: on
line diff
--- a/app/controller/form/Messung.js	Thu Mar 26 14:13:47 2015 +0100
+++ b/app/controller/form/Messung.js	Thu Mar 26 15:54:50 2015 +0100
@@ -57,11 +57,16 @@
                 formPanel.getForm().loadRecord(formPanel.getForm().getRecord());
                 var json = response.request.scope.reader.jsonData;
                 if (json) {
-                    formPanel.setMessages(json.errors, json.warnings);
+                    if(json.errors.totalCount > 0 || json.warnings.totalCount > 0) {
+                        formPanel.setMessages(json.errors, json.warnings);
+                    }
+
+                    if(json.message){
+                        Ext.Msg.alert(Lada.getApplication().bundle.getMsg('errmsgtitle'), Lada.getApplication().bundle.getMsg(json.message));
+                    }
                 }
             }
         });
-        console.log('save');
     },
 
     discard: function(button) {

http://lada.wald.intevation.org