comparison 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
comparison
equal deleted inserted replaced
84:5ad82cff1a21 85:079f99229eff
99 for (var k in codes) { 99 for (var k in codes) {
100 translated[k] = Lada.getApplication().bundle.getMsg(codes[k]); 100 translated[k] = Lada.getApplication().bundle.getMsg(codes[k]);
101 } 101 }
102 return translated; 102 return translated;
103 }, 103 },
104 setReadOnly: function (bReadOnly) {
105 this.getForm().getFields().each (function (field) {
106 //field.setDisabled(bReadOnly);
107 field.setReadOnly(bReadOnly);
108 });
109 },
104 parseResponse: function(operation) { 110 parseResponse: function(operation) {
105 this.errors = this.translateReturnCodes(operation.request.scope.reader.jsonData["errors"]); 111 this.errors = this.translateReturnCodes(operation.request.scope.reader.jsonData["errors"]);
106 this.warnings = this.translateReturnCodes(operation.request.scope.reader.jsonData["warnings"]); 112 this.warnings = this.translateReturnCodes(operation.request.scope.reader.jsonData["warnings"]);
107 this.message = Lada.getApplication().bundle.getMsg(operation.request.scope.reader.jsonData["message"]); 113 this.message = Lada.getApplication().bundle.getMsg(operation.request.scope.reader.jsonData["message"]);
108 } 114 }

http://lada.wald.intevation.org