forked from extern/egroupware
Don't complain about read-only required fields
This commit is contained in:
parent
da35098e08
commit
4e947b304c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user