Add readonly value to readonly option

This commit is contained in:
Hadi Nategh 2020-05-13 11:56:49 +02:00
parent 1dc1d07dea
commit 0748fba70f
2 changed files with 4 additions and 2 deletions

View File

@ -140,10 +140,11 @@ var et2_radiobox = /** @class */ (function (_super) {
}; };
/** /**
* Set radio readonly attribute. * Set radio readonly attribute.
* Do not confuse this with etemplate readonly, which would use et_textbox_ro instead *
* @param _readonly Boolean * @param _readonly Boolean
*/ */
et2_radiobox.prototype.set_readonly = function (_readonly) { et2_radiobox.prototype.set_readonly = function (_readonly) {
this.options.readonly = _readonly;
this.getRoot().iterateOver(function (radio) { this.getRoot().iterateOver(function (radio) {
if (radio.id == this.id) { if (radio.id == this.id) {
radio.input.prop('disabled', _readonly); radio.input.prop('disabled', _readonly);

View File

@ -174,11 +174,12 @@ class et2_radiobox extends et2_inputWidget
/** /**
* Set radio readonly attribute. * Set radio readonly attribute.
* Do not confuse this with etemplate readonly, which would use et_textbox_ro instead *
* @param _readonly Boolean * @param _readonly Boolean
*/ */
set_readonly(_readonly) set_readonly(_readonly)
{ {
this.options.readonly = _readonly;
this.getRoot().iterateOver(function(radio) this.getRoot().iterateOver(function(radio)
{ {
if (radio.id == this.id) if (radio.id == this.id)