Mercurial > lada > lada-client
comparison app/controller/form/Ortszuordnung.js @ 1295:171eacf989d8
Show error and warnings in new forms
author | Maximilian Krambach <mkrambach@intevation.de> |
---|---|
date | Thu, 02 Feb 2017 11:04:01 +0100 |
parents | 16a80ca16732 |
children | c413ec1aaa2e |
comparison
equal
deleted
inserted
replaced
1294:c1b7db04b39c | 1295:171eacf989d8 |
---|---|
89 formPanel.getForm().loadRecord(formPanel.getForm().getRecord()); | 89 formPanel.getForm().loadRecord(formPanel.getForm().getRecord()); |
90 var json = response.request.scope.reader.jsonData; | 90 var json = response.request.scope.reader.jsonData; |
91 if (json) { | 91 if (json) { |
92 if(Object.keys(json.errors).length > 0 || | 92 if(Object.keys(json.errors).length > 0 || |
93 Object.keys(json.warnings).length > 0) { | 93 Object.keys(json.warnings).length > 0) { |
94 | |
95 formPanel.setMessages(json.errors, json.warnings); | 94 formPanel.setMessages(json.errors, json.warnings); |
96 } | 95 } |
97 | |
98 if(json.message){ | 96 if(json.message){ |
99 Ext.Msg.alert(i18n.getMsg('err.msg.save.title') | 97 Ext.Msg.alert(i18n.getMsg('err.msg.save.title') |
100 +' #'+json.message, | 98 +' #'+json.message, |
101 i18n.getMsg(json.message)); | 99 i18n.getMsg(json.message)); |
102 } else { | 100 } else { |