forked from extern/egroupware
Fix et2_checkbox_ro widget for exceptional cases when we pass value as Non-Boolean
This commit is contained in:
parent
43e1bfcc12
commit
54ab073cab
@ -148,8 +148,13 @@ var et2_checkbox_ro = et2_checkbox.extend(
|
|||||||
this.setDOMNode(this.span[0]);
|
this.setDOMNode(this.span[0]);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* note: checkbox is checked if even there is a value but not only if the _value is only "true"
|
||||||
|
* it's an exceptional validation for cases that we pass non boolean values as checkbox _value
|
||||||
|
*/
|
||||||
set_value: function(_value) {
|
set_value: function(_value) {
|
||||||
if(_value == this.options.selected_value) {
|
if(_value == this.options.selected_value ||_value && this.options.selected_value == this.__proto__.attributes.selected_value["default"] &&
|
||||||
|
_value != this.options.unselected_value) {
|
||||||
this.span.text(this.options.ro_true);
|
this.span.text(this.options.ro_true);
|
||||||
this.value = _value;
|
this.value = _value;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user