comparison app/controller/form/Messprogramm.js @ 1192:d57462b81444 schema-update

Set new field 'gemId' in messprogramm.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 07 Sep 2016 17:37:41 +0200
parents 7baaf2cd3f57
children
comparison
equal deleted inserted replaced
1187:793748ded4d4 1192:d57462b81444
178 * on failure, it will display an Errormessage 178 * on failure, it will display an Errormessage
179 */ 179 */
180 save: function(button) { 180 save: function(button) {
181 var formPanel = button.up('form'); 181 var formPanel = button.up('form');
182 var data = formPanel.getForm().getFieldValues(true); 182 var data = formPanel.getForm().getFieldValues(true);
183 var orte = Ext.data.StoreManager.get('orte');
184 var gemId = orte.getById(data['ortId']).get('gemId');
183 for (var key in data) { 185 for (var key in data) {
184 formPanel.getForm().getRecord().set(key, data[key]); 186 formPanel.getForm().getRecord().set(key, data[key]);
185 } 187 }
188 formPanel.getForm().getRecord().set('gemId', gemId);
186 if (!formPanel.getForm().getRecord().get('letzteAenderung')) { 189 if (!formPanel.getForm().getRecord().get('letzteAenderung')) {
187 formPanel.getForm().getRecord().data.letzteAenderung = new Date(); 190 formPanel.getForm().getRecord().data.letzteAenderung = new Date();
188 } 191 }
189 formPanel.getForm().getRecord().save({ 192 formPanel.getForm().getRecord().save({
190 success: function(record, response) { 193 success: function(record, response) {

http://lada.wald.intevation.org