diff app/controller/form/Messprogramm.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 01cddda65fea
children 33927274f013
line wrap: on
line diff
--- a/app/controller/form/Messprogramm.js	Mon Nov 16 11:51:11 2015 +0100
+++ b/app/controller/form/Messprogramm.js	Tue Nov 17 14:58:17 2015 +0100
@@ -176,7 +176,7 @@
 
     },
     /**
-     * The save function saves the content of the Location form.
+     * The save function saves the content of the Messprogramm form.
      * On success it will reload the Store,
      * on failure, it will display an Errormessage
      */
@@ -186,6 +186,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