diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index e7e62d9..073a3ce 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -12,6 +12,7 @@ Yii Framework 2 Change Log - Bug: Fixed `Call to a member function registerAssetFiles() on a non-object` in case of wrong `sourcePath` for an asset bundle (samdark) - Bug: Fixed incorrect event name for `yii\jui\Spinner` (samdark) - Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe) +- Bug: Fixed issue with tabular input on ActiveField::radio() and ActiveField::checkbox() (jom) - Enh #1293: Replaced Console::showProgress() with a better approach. See Console::startProgress() for details (cebe) - Enh #1406: DB Schema support for Oracle Database (p0larbeer, qiangxue) - Enh #1437: Added ListView::viewParams (qiangxue) diff --git a/framework/yii/widgets/ActiveField.php b/framework/yii/widgets/ActiveField.php index 0320516..4228ea9 100644 --- a/framework/yii/widgets/ActiveField.php +++ b/framework/yii/widgets/ActiveField.php @@ -371,7 +371,8 @@ class ActiveField extends Component { if ($enclosedByLabel) { if (!isset($options['label'])) { - $options['label'] = Html::encode($this->model->getAttributeLabel($this->attribute)); + $attribute = Html::getAttributeName($this->attribute); + $options['label'] = Html::encode($this->model->getAttributeLabel($attribute)); } $this->parts['{input}'] = Html::activeRadio($this->model, $this->attribute, $options); $this->parts['{label}'] = ''; @@ -406,7 +407,8 @@ class ActiveField extends Component { if ($enclosedByLabel) { if (!isset($options['label'])) { - $options['label'] = Html::encode($this->model->getAttributeLabel($this->attribute)); + $attribute = Html::getAttributeName($this->attribute); + $options['label'] = Html::encode($this->model->getAttributeLabel($attribute)); } $this->parts['{input}'] = Html::activeCheckbox($this->model, $this->attribute, $options); $this->parts['{label}'] = '';