Mercurial > lada > lada-client
diff app/controller/form/Ort.js @ 972:24b5684d74d7
Set letzteAenderung in a Bunch of controllers.
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Tue, 17 Nov 2015 14:58:17 +0100 |
parents | 6e28ebbe1a73 |
children |
line wrap: on
line diff
--- a/app/controller/form/Ort.js Mon Nov 16 11:51:11 2015 +0100 +++ b/app/controller/form/Ort.js Tue Nov 17 14:58:17 2015 +0100 @@ -33,7 +33,7 @@ }, /** - * The save function saves the content of the Location form. + * The save function saves the content of the Ort form. * On success it will reload the Store, * on failure, it will display an Errormessage */ @@ -43,6 +43,9 @@ for (var key in data) { formPanel.getForm().getRecord().set(key, data[key]); } + if (!formPanel.getForm().getRecord().get('letzteAenderung')) { + formPanel.getForm().getRecord().data.letzteAenderung = new Date(); + } formPanel.getForm().getRecord().save({ success: function(record, response) { var json = Ext.decode(response.response.responseText);