Skip to content

Commit

Permalink
bug fix field template
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmunir committed Aug 4, 2016
1 parent daa8db6 commit a005d9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DataColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function renderInputCell($model, $key, $index)
$options = [];
}
if ($form instanceof ActiveForm) {
return $form->field($model, "[$key]{$this->attribute}", $this->template)
return $form->field($model, "[$key]{$this->attribute}", ['template' => $this->template])
->widget($widget, $options);
} else {
$options = array_merge([
Expand All @@ -114,14 +114,14 @@ public function renderInputCell($model, $key, $index)
$items = call_user_func($items, $model, $key, $index);
}
if ($form instanceof ActiveForm) {
return $form->field($model, "[$key]{$this->attribute}", $this->template)
return $form->field($model, "[$key]{$this->attribute}", ['template' => $this->template])
->dropDownList($items, $this->inputOptions);
} else {
return Html::activeDropDownList($model, "[$key]{$this->attribute}", $items, $this->inputOptions);
}
} else {
if ($form instanceof ActiveForm) {
return $form->field($model, "[$key]{$this->attribute}", $this->template)
return $form->field($model, "[$key]{$this->attribute}", ['template' => $this->template])
->textInput($this->inputOptions);
}
return Html::activeTextInput($model, "[$key]{$this->attribute}", $this->inputOptions);
Expand Down

0 comments on commit a005d9e

Please sign in to comment.