diff app/view/widgets/LadaForm.js @ 85:079f99229eff

Added function to mark the form as readonly.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 11 Jun 2013 11:18:56 +0200
parents 5ad82cff1a21
children ee1d1305dcff
line wrap: on
line diff
--- a/app/view/widgets/LadaForm.js	Tue Jun 11 11:18:17 2013 +0200
+++ b/app/view/widgets/LadaForm.js	Tue Jun 11 11:18:56 2013 +0200
@@ -101,6 +101,12 @@
         }
         return translated;
     },
+    setReadOnly: function (bReadOnly) {
+        this.getForm().getFields().each (function (field) {
+            //field.setDisabled(bReadOnly);
+            field.setReadOnly(bReadOnly);
+        });
+    },
     parseResponse: function(operation) {
         this.errors = this.translateReturnCodes(operation.request.scope.reader.jsonData["errors"]);
         this.warnings = this.translateReturnCodes(operation.request.scope.reader.jsonData["warnings"]);

http://lada.wald.intevation.org