changeset 281:12ef979e73ce

Partially fixed issue55: Ignore the "fertig" field form when setting the form into readonly state. TODO: Only ignore the field if the current user is allowed to edit the messung.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 08 Aug 2013 11:13:44 +0200
parents 1afccc0cab90
children ee5767cd2dde
files app/controller/Messungen.js
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Messungen.js	Thu Aug 08 11:11:55 2013 +0200
+++ b/app/controller/Messungen.js	Thu Aug 08 11:13:44 2013 +0200
@@ -80,7 +80,12 @@
         var view = Ext.widget('messungenedit', {model: record});
         if (probe.get('readonly') === true) {
             var form = view.down('form');
-            form.setReadOnly(true);
+            // TODO: Field "fertig" must be editable (issue51). So we need to remove the
+            // readonly status if the user would be allowed to edit the probe
+            // if the "fertig" flag has not been set. (ti) <2013-08-08 10:24> 
+            var ignore = Array();
+            ignore.push('fertig');
+            form.setReadOnly(true, ignore);
         }
         console.log("Loaded Messung with ID " + record.getId()); //outputs ID
     },

http://lada.wald.intevation.org