[Lada-commits] [PATCH 3 of 3] Partially fixed issue55: Ignore the "fertig" field form when setting the form

Wald Commits scm-commit at wald.intevation.org
Thu Aug 8 11:15:14 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1375953224 -7200
# Node ID 12ef979e73ce47534ee0cef00af4c9d54b956415
# Parent  1afccc0cab90fe121644caf1adb68b2fde8ccb52
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.

diff -r 1afccc0cab90 -r 12ef979e73ce app/controller/Messungen.js
--- 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
     },


More information about the Lada-commits mailing list