Skip to content
Permalink
Browse files

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

  • Loading branch information...
ingk committed Nov 17, 2011
1 parent 02912b6 commit 7dfe72708f9fb7e5f46dd4910e63761fa1e02203
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/View/Helper/FormHelper.php
@@ -1303,7 +1303,7 @@ public function radio($fieldName, $options = array(), $attributes = array()) {
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(

0 comments on commit 7dfe727

Please sign in to comment.
You can’t perform that action at this time.