Mercurial > lada > lada-client
changeset 1311:2d92be45df9e
update the record according to form when sending similar Ort in Ortserstellung
author | Maximilian Krambach <mkrambach@intevation.de> |
---|---|
date | Fri, 03 Feb 2017 09:35:30 +0100 (2017-02-03) |
parents | 9b50bf4c218b |
children | f60b73cbdee4 |
files | app/view/form/Ortserstellung.js |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/app/view/form/Ortserstellung.js Thu Feb 02 19:04:02 2017 +0100 +++ b/app/view/form/Ortserstellung.js Fri Feb 03 09:35:30 2017 +0100 @@ -267,14 +267,13 @@ saveOrt: function() { var this_panel = this.up('panel'); var form = this_panel.getForm(); + var record = form.getRecord(); var data = form.getFieldValues(true); for (var key in data) { - form.getRecord().set(key, data[key]); + record.set(key, data[key]); } - this_panel.record.set('letzteAenderung', 0); - this_panel.record.set('id', null); - this_panel.record.set('netzbetreiberId', Lada.netzbetreiber[0]); - this_panel.record.save({ + record.set('netzbetreiberId', Lada.netzbetreiber[0]); + record.save({ success: function(record, response) { var newOrtId; var ozw = this_panel.up().parentWindow; @@ -364,4 +363,4 @@ // TODO: this is a stub } -}); +e);