Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
To add the property disabled to the label. I find a solution below:
In TCheckBox.php find:
protected function renderLabel($writer,$clientID,$text)
{
$writer->addAttribute('for',$clientID);
Right after, add:
if(!$this->getEnabled(true))
$writer->addAttribute('disabled','disabled');
After test, I worked correctly in IE but not Firefox.
After a study on Google, I tested and realized that the label disability is can
just work in IE and not Firefox. So a work ground in changing its color to gray
is all that I can do for now:
if(!$this->getEnabled(true)){
$writer->addAttribute('disabled','disabled');
$writer->addAttribute('style','color:gray;');
}
Original comment by lon...@gmail.com
on 29 Sep 2010 at 6:07
Attachments:
But I think, this is unnecessary for the label to grey out because for most of
browsers (IE, Firefox, Chrome...) the standard label associated to a
checkbox/radio won't grey out when its associated control being disabled (Try
the label here http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_label -
add property disabled="true")
So I suggest, this is not a bug, and if we want this behavior, just need to
make a XCheckBox with a combination of a TLinkButton + TCheckBox and share this
on the repository.
Original comment by lon...@gmail.com
on 3 May 2011 at 10:05
Original comment by ctrlal...@gmail.com
on 10 Nov 2011 at 9:42
Original issue reported on code.google.com by
google...@pcforum.hu
on 4 Apr 2010 at 10:44