Permalink
Browse files

MINOR Fixed OptionsetField->disabledItems omission from r99596

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@99708 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 03b9434 commit ddbc3e96b3c01e35e17edafb1fd2af6bb61257b5 @chillu chillu committed Feb 23, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 forms/OptionsetField.php
View
2 forms/OptionsetField.php
@@ -47,7 +47,7 @@ function Field() {
$odd = ($odd + 1) % 2;
$extraClass = $odd ? "odd" : "even";
$extraClass .= " val" . preg_replace('/[^a-zA-Z0-9\-\_]/','_', $key);
- $disabled = $this->disabled ? 'disabled="disabled"' : '';
+ $disabled = ($this->disabled || in_array($key, $this->disabledItems)) ? 'disabled="disabled"' : '';
$options .= "<li class=\"".$extraClass."\"><input id=\"$itemID\" name=\"$this->name\" type=\"radio\" value=\"$key\"$checked $disabled class=\"radio\" /> <label for=\"$itemID\">$value</label></li>\n";
}

0 comments on commit ddbc3e9

Please sign in to comment.