diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index dd7cff6..c071a94 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -4,6 +4,7 @@ Yii Framework 2 Change Log 2.0.10 under development ------------------------ +- Bug #12629: Fixed `ActiveField::widget()` to call `adjustLabelFor()` for `InputWidget` descendants (coderlex) - Bug #7670: Added `UrlNormalizer` for normalizing requests with and without trailing slashes (rob006, cronfy, klimov-paul) - Bug #9027: Fixed descendant class of `yii\web\UploadedFile` returns parent instances in case invoked after it (andrewnester) - Bug #12428: Fixed `yii\db\mysql\QueryBuilder` causes warning when insert default rows into a table without primary key (DrmagicE) diff --git a/framework/widgets/ActiveField.php b/framework/widgets/ActiveField.php index 05a4644..a628224 100644 --- a/framework/widgets/ActiveField.php +++ b/framework/widgets/ActiveField.php @@ -697,6 +697,9 @@ class ActiveField extends Component $config['model'] = $this->model; $config['attribute'] = $this->attribute; $config['view'] = $this->form->getView(); + if (in_array('yii\widgets\InputWidget', class_parents($class)) && isset($config['options'])) { + $this->adjustLabelFor($config['options']); + } $this->parts['{input}'] = $class::widget($config); return $this;