diff --git a/etemplate/js/et2_core_inputWidget.js b/etemplate/js/et2_core_inputWidget.js index 632f201e79..53e7bd3a77 100644 --- a/etemplate/js/et2_core_inputWidget.js +++ b/etemplate/js/et2_core_inputWidget.js @@ -165,7 +165,7 @@ var et2_inputWidget = et2_valueWidget.extend([et2_IInput,et2_ISubmitListener], var node = this.getInputNode(); if (node) { - if(_value) { + if(_value && !this.options.readonly) { $j(node).attr("required", "required"); } else { node.removeAttribute("required"); @@ -243,7 +243,7 @@ var et2_inputWidget = et2_valueWidget.extend([et2_IInput,et2_ISubmitListener], var ok = true; // Check for required - if(this.options.needed && (this.getValue() == null || this.getValue().valueOf() == '')) + if(this.options.needed && !this.options.readonly && (this.getValue() == null || this.getValue().valueOf() == '')) { messages.push(this.egw().lang('input required')); ok = false;