mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-11 19:20:01 +08:00
Merge remote-tracking branch 'origin/master'
* origin/master: Update change log Add active id to options if input widget has a model fixes #1550
This commit is contained in:
@@ -50,6 +50,9 @@ class InputWidget extends Widget
|
|||||||
if ($this->hasModel() && !isset($this->options['id'])) {
|
if ($this->hasModel() && !isset($this->options['id'])) {
|
||||||
$this->options['id'] = Html::getInputId($this->model, $this->attribute);
|
$this->options['id'] = Html::getInputId($this->model, $this->attribute);
|
||||||
}
|
}
|
||||||
|
if($this->hasModel() && !array_key_exists('id', $this->options)) {
|
||||||
|
$this->options['id'] = Html::getInputId($this->model, $this->attribute);
|
||||||
|
}
|
||||||
parent::init();
|
parent::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user