Permalink
Browse files

Render disabled QListItems in a QRadioButtonList as disabled

  • Loading branch information...
1 parent d4440e1 commit bb65cd7732138eea5c63bb795fcb76e07bd4dd04 Justin Sinclair committed Aug 16, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 includes/qcodo/_core/qform/QRadioButtonList.class.php
@@ -166,7 +166,7 @@ protected function GetControlHtml() {
$strActions = $this->GetActionAttributes();
if ($this->strTextAlign == QTextAlign::Left) {
- $strToReturn .= sprintf('<td>%s<label for="%s_%s" %s>%s</label><input id="%s_%s" name="%s" value="%s" type="radio" %s%s%s%s%s />%s</td>',
+ $strToReturn .= sprintf('<td>%s<label for="%s_%s" %s>%s</label><input id="%s_%s" name="%s" value="%s" type="radio" %s%s%s%s%s%s />%s</td>',
$strDisabledStart,
$this->strControlId,
$intIndex,
@@ -181,9 +181,10 @@ protected function GetControlHtml() {
$strActions,
$strTabIndex,
$strCheckboxAttributes,
+ (!$this->objItemsArray[$intIndex]->Enabled) ? 'disabled="disabled"' : "",
$strDisabledEnd);
} else {
- $strToReturn .= sprintf('<td>%s<input id="%s_%s" name="%s" value="%s" type="radio" %s%s%s%s%s /><label for="%s_%s" %s>%s</label>%s</td>',
+ $strToReturn .= sprintf('<td>%s<input id="%s_%s" name="%s" value="%s" type="radio" %s%s%s%s%s%s /><label for="%s_%s" %s>%s</label>%s</td>',
$strDisabledStart,
$this->strControlId,
$intIndex,
@@ -194,6 +195,7 @@ protected function GetControlHtml() {
$strActions,
$strTabIndex,
$strCheckboxAttributes,
+ (!$this->objItemsArray[$intIndex]->Enabled) ? 'disabled="disabled"' : "",
$this->strControlId,
$intIndex,
$strLabelAttributes,

0 comments on commit bb65cd7

Please sign in to comment.