diff app/controller/form/Probe.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 50d7b6e17525
children d198946e5540
line wrap: on
line diff
--- a/app/controller/form/Probe.js	Mon Nov 16 11:51:11 2015 +0100
+++ b/app/controller/form/Probe.js	Tue Nov 17 14:58:17 2015 +0100
@@ -78,7 +78,7 @@
     },
 
     /**
-     * The save function saves the content of the Location form.
+     * The save function saves the content of the Messung form.
      * On success it will reload the Store,
      * on failure, it will display an Errormessage
      */
@@ -88,6 +88,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);

http://lada.wald.intevation.org