mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-15 11:11:49 +01:00
Disable checkbox properly when it contains label
This commit is contained in:
parent
fa9eda18b8
commit
b101d2e509
@ -189,6 +189,23 @@ class et2_checkbox extends et2_inputWidget
|
||||
return this.options.unselected_value;
|
||||
}
|
||||
}
|
||||
|
||||
set_disabled(_value)
|
||||
{
|
||||
let parentNode = jQuery(this.getDOMNode()).parent();
|
||||
if (parentNode[0] && parentNode[0].nodeName == "label" && parentNode.hasClass('.et2_checkbox_label'))
|
||||
{
|
||||
if (_value)
|
||||
{
|
||||
parentNode.hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
parentNode.show();
|
||||
}
|
||||
}
|
||||
super.set_disabled(_value);
|
||||
}
|
||||
}
|
||||
et2_register_widget(et2_checkbox, ["checkbox"]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user