# HG changeset patch # User Torsten Irländer # Date 1370942336 -7200 # Node ID 079f99229effbf097c3c376270eebd2eb4333d74 # Parent 5ad82cff1a21a32795ca8cb5a3d11202d963c993 Added function to mark the form as readonly. diff -r 5ad82cff1a21 -r 079f99229eff app/view/widgets/LadaForm.js --- 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"]);