mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Implements set_readonly for radiobox
This commit is contained in:
parent
538d25333e
commit
1dc1d07dea
@ -138,6 +138,18 @@ var et2_radiobox = /** @class */ (function (_super) {
|
||||
}
|
||||
return ok;
|
||||
};
|
||||
/**
|
||||
* Set radio readonly attribute.
|
||||
* Do not confuse this with etemplate readonly, which would use et_textbox_ro instead
|
||||
* @param _readonly Boolean
|
||||
*/
|
||||
et2_radiobox.prototype.set_readonly = function (_readonly) {
|
||||
this.getRoot().iterateOver(function (radio) {
|
||||
if (radio.id == this.id) {
|
||||
radio.input.prop('disabled', _readonly);
|
||||
}
|
||||
}, this, et2_radiobox);
|
||||
};
|
||||
et2_radiobox._attributes = {
|
||||
"set_value": {
|
||||
"name": "Set value",
|
||||
|
@ -171,6 +171,23 @@ class et2_radiobox extends et2_inputWidget
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set radio readonly attribute.
|
||||
* Do not confuse this with etemplate readonly, which would use et_textbox_ro instead
|
||||
* @param _readonly Boolean
|
||||
*/
|
||||
set_readonly(_readonly)
|
||||
{
|
||||
this.getRoot().iterateOver(function(radio)
|
||||
{
|
||||
if (radio.id == this.id)
|
||||
{
|
||||
radio.input.prop('disabled',_readonly);
|
||||
}
|
||||
}, this, et2_radiobox);
|
||||
}
|
||||
|
||||
}
|
||||
et2_register_widget(et2_radiobox, ["radio"]);
|
||||
|
||||
|
@ -2608,7 +2608,9 @@ span.et2_checkbox_slideSwitch.switchOn > span.slideSwitch_container a {
|
||||
.et2_radiobox {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.et2_radiobox[disabled] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
/**
|
||||
* Do not wrap content of a single widget incl. a label or children of a hbox.
|
||||
* Taking into eg. select-account widget rendered as ul and prefixed with a label
|
||||
|
Loading…
Reference in New Issue
Block a user