Browse Source

Fixes #795: do not generate form-control css class for file input as it would display an unneeded border.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
528f8c82f3
  1. 4
      framework/yii/widgets/ActiveField.php

4
framework/yii/widgets/ActiveField.php

@ -323,7 +323,9 @@ class ActiveField extends Component
*/ */
public function fileInput($options = array()) public function fileInput($options = array())
{ {
$options = array_merge($this->inputOptions, $options); if ($this->inputOptions !== array('class' => 'form-control')) {
$options = array_merge($this->inputOptions, $options);
}
$this->parts['{input}'] = Html::activeFileInput($this->model, $this->attribute, $options); $this->parts['{input}'] = Html::activeFileInput($this->model, $this->attribute, $options);
return $this; return $this;
} }

Loading…
Cancel
Save