comparison app/controller/form/Messprogramm.js @ 1217:4270da0f7d3b

Merged branch schema-update into default.
author Tom Gottfried <tom@intevation.de>
date Fri, 14 Oct 2016 18:34:19 +0200
parents a24de34d6423
children e8dd06450f2c
comparison
equal deleted inserted replaced
1216:75e5caebd392 1217:4270da0f7d3b
199 * on failure, it will display an Errormessage 199 * on failure, it will display an Errormessage
200 */ 200 */
201 save: function(button) { 201 save: function(button) {
202 var formPanel = button.up('form'); 202 var formPanel = button.up('form');
203 var data = formPanel.getForm().getFieldValues(true); 203 var data = formPanel.getForm().getFieldValues(true);
204 var orte = Ext.data.StoreManager.get('orte');
205 var gemId = orte.getById(data['ortId']).get('gemId');
204 for (var key in data) { 206 for (var key in data) {
205 formPanel.getForm().getRecord().set(key, data[key]); 207 formPanel.getForm().getRecord().set(key, data[key]);
206 } 208 }
209 formPanel.getForm().getRecord().set('gemId', gemId);
207 if (!formPanel.getForm().getRecord().get('letzteAenderung')) { 210 if (!formPanel.getForm().getRecord().get('letzteAenderung')) {
208 formPanel.getForm().getRecord().data.letzteAenderung = new Date(); 211 formPanel.getForm().getRecord().data.letzteAenderung = new Date();
209 } 212 }
210 formPanel.getForm().getRecord().save({ 213 formPanel.getForm().getRecord().save({
211 success: function(record, response) { 214 success: function(record, response) {

http://lada.wald.intevation.org