From f756a45f51901ecedba56cc299d7e17e924762db Mon Sep 17 00:00:00 2001 From: Niko Wicaksono Date: Fri, 9 Aug 2013 11:49:40 +0700 Subject: [PATCH] Update radio and checkbox due to e3801fbf6bdf167c31f4f2bbb774f75659956d57 --- framework/yii/helpers/HtmlBase.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/framework/yii/helpers/HtmlBase.php b/framework/yii/helpers/HtmlBase.php index ea36d48..f368b97 100644 --- a/framework/yii/helpers/HtmlBase.php +++ b/framework/yii/helpers/HtmlBase.php @@ -570,7 +570,8 @@ class HtmlBase $label = $options['label']; $labelOptions = isset($options['labelOptions']) ? $options['labelOptions'] : array(); unset($options['label'], $options['labelOptions']); - return $hidden . static::label(static::input('radio', $name, $value, $options) . ' ' . $label, null, $labelOptions); + $content = static::label(static::input('radio', $name, $value, $options) . ' ' . $label, null, $labelOptions); + return $hidden . static::tag('div', $content, array('class' => 'radio')); } else { return $hidden . static::input('radio', $name, $value, $options); } @@ -610,7 +611,8 @@ class HtmlBase $label = $options['label']; $labelOptions = isset($options['labelOptions']) ? $options['labelOptions'] : array(); unset($options['label'], $options['labelOptions']); - return $hidden . static::label(static::input('checkbox', $name, $value, $options) . ' ' . $label, null, $labelOptions); + $content = static::label(static::input('checkbox', $name, $value, $options) . ' ' . $label, null, $labelOptions); + return $hidden . static::tag('div', $content, array('class' => 'checkbox')); } else { return $hidden . static::input('checkbox', $name, $value, $options); } @@ -760,7 +762,8 @@ class HtmlBase $lines[] = call_user_func($formatter, $index, $label, $name, $checked, $value); } else { $checkbox = static::checkbox($name, $checked, array('value' => $value)); - $lines[] = static::label($checkbox . ' ' . ($encode ? static::encode($label) : $label)); + $content = static::label($checkbox . ' ' . ($encode ? static::encode($label) : $label)); + $lines[] = static::tag('div', $content, array('class' => 'checkbox')); } $index++; } @@ -817,7 +820,8 @@ class HtmlBase $lines[] = call_user_func($formatter, $index, $label, $name, $checked, $value); } else { $radio = static::radio($name, $checked, array('value' => $value)); - $lines[] = static::label($radio . ' ' . ($encode ? static::encode($label) : $label)); + $content = static::label($radio . ' ' . ($encode ? static::encode($label) : $label)); + $lines[] = static::tag('div', $content, array('class' => 'radio')); } $index++; }