Allow a boolean value for the disabled attribute in function radio.

This commit is contained in:
Christian Hieke 2011-11-17 15:59:14 +01:00
parent 02912b6eeb
commit 7dfe72708f

View file

@ -1303,7 +1303,7 @@ class FormHelper extends AppHelper {
if (isset($value) && $optValue == $value) {
$optionsHere['checked'] = 'checked';
}
if (!empty($disabled) && in_array($optValue, $disabled)) {
if (!empty($disabled) && (is_bool($disabled) || in_array($optValue, $disabled))) {
$optionsHere['disabled'] = true;
}
$tagName = Inflector::camelize(