changeset 211:401d559e0461

Fix rendering the form readonly.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 12 Jul 2013 15:56:41 +0200 (2013-07-12)
parents f3a2f985f451
children 92facbaece42
files app/view/widgets/LadaForm.js
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/widgets/LadaForm.js	Fri Jul 12 11:49:37 2013 +0200
+++ b/app/view/widgets/LadaForm.js	Fri Jul 12 15:56:41 2013 +0200
@@ -60,8 +60,8 @@
         this.model = model;
         this.loadRecord(model);
         // Set the form to readonly if the models readonly attribute is
-        // anything dffernt from true
-        if (model.get('readonly') !== false) {
+        // true
+        if (model.get('readonly') === true) {
             this.setReadOnly(true);
         }
     },
@@ -131,7 +131,7 @@
             this.warnings = this.translateReturnCodes(json.warnings);
             this.message = Lada.getApplication().bundle.getMsg(json.message);
         } else {
-            this.setReadOnly(true);
+            this.setReadOnly(this.model.get('readonly'));
         }
     }
 });

http://lada.wald.intevation.org