Commit 780c3944 by Carsten Brandt

remove requirement of `name` field on Jui InputWidget

there is no benefit in enforcing it. fixes #7127
parent 770d65a0
...@@ -4,7 +4,7 @@ Yii Framework 2 jui extension Change Log ...@@ -4,7 +4,7 @@ Yii Framework 2 jui extension Change Log
2.0.3 under development 2.0.3 under development
----------------------- -----------------------
- no changes in this release. - Enh #7127: `name` or `model` and `attribute` are no longer required properties of `yii\jui\InputWidget` (nirvana-msu, cebe)
2.0.2 January 11, 2015 2.0.2 January 11, 2015
......
...@@ -43,9 +43,6 @@ class InputWidget extends Widget ...@@ -43,9 +43,6 @@ class InputWidget extends Widget
*/ */
public function init() public function init()
{ {
if (!$this->hasModel() && $this->name === null) {
throw new InvalidConfigException("Either 'name', or 'model' and 'attribute' properties must be specified.");
}
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);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment