Etemplate: if readonly radiobox has the default ro_true=X, we still need the label

This commit is contained in:
nathangray 2021-01-26 13:09:39 -07:00
parent 867fcc17c6
commit e980f3a851
2 changed files with 11 additions and 2 deletions

View File

@ -212,7 +212,11 @@ var et2_radiobox_ro = /** @class */ (function (_super) {
} }
}; };
et2_radiobox_ro.prototype.set_label = function (_label) { et2_radiobox_ro.prototype.set_label = function (_label) {
// no label for ro radio, we show label of checked option as content // no label for ro radio, we show label of checked option as content, unless it's x
// then we need the label for things to make sense
if (this.options.ro_true == "x") {
return _super.prototype.set_label.call(this, _label);
}
}; };
/** /**
* Code for implementing et2_IDetachedDOM * Code for implementing et2_IDetachedDOM

View File

@ -257,7 +257,12 @@ class et2_radiobox_ro extends et2_valueWidget implements et2_IDetachedDOM
} }
set_label(_label) { set_label(_label) {
// no label for ro radio, we show label of checked option as content // no label for ro radio, we show label of checked option as content, unless it's x
// then we need the label for things to make sense
if(this.options.ro_true == "x")
{
return super.set_label(_label);
}
} }
/** /**