/**
  * @inheritdoc
  */
 public function run()
 {
     if ($this->enableClientScript) {
         $view = $this->getView();
         JasnyBootstrapAsset::register($view);
     }
     return implode("\n", [Html::beginTag('div', ['class' => 'fileinput fileinput-new input-group', 'data-provides' => 'fileinput']), Html::beginTag('div', ['class' => 'form-control', 'data-trigger' => 'fileinput']), Html::tag('i', '', ['class' => 'glyphicon glyphicon-file fileinput-exists']), Html::tag('span', '', ['class' => 'fileinput-filename']), Html::endTag('div'), Html::beginTag('span', ['class' => 'input-group-addon btn btn-default btn-file']), Html::tag('span', $this->selectButtonTitle, ['class' => 'fileinput-new']), Html::tag('span', $this->changeButtonTitle, ['class' => 'fileinput-exists']), Html::activeFileInput($this->model, $this->attribute, $this->options), Html::endTag('span'), Html::a($this->removeButtonTitle, '#', ['class' => 'input-group-addon btn btn-default fileinput-exists', 'data-dismiss' => 'fileinput']), Html::endTag('div')]) . "\n";
 }
 /**
  * @inheritdoc
  */
 public function run()
 {
     if ($this->enableClientScript) {
         $view = $this->getView();
         JasnyBootstrapAsset::register($view);
     }
     $previewParams = ['class' => 'fileinput-preview thumbnail', 'data-trigger' => 'fileinput'];
     if ($this->previewWidth and $this->previewHeight) {
         $previewParams['style'] = 'width: ' . $this->previewWidth . 'px; height: ' . $this->previewHeight . 'px;';
     }
     return implode("\n", [Html::beginTag('div', ['class' => 'fileinput fileinput-new fileinput-image', 'data-provides' => 'fileinput']), Html::beginTag('div', $previewParams), Html::endTag('div'), Html::beginTag('div'), Html::beginTag('span', ['class' => 'btn btn-default btn-file']), Html::tag('span', $this->selectButtonTitle, ['class' => 'fileinput-new']), Html::tag('span', $this->changeButtonTitle, ['class' => 'fileinput-exists']), Html::activeFileInput($this->model, $this->attribute, $this->options), Html::endTag('span'), Html::a($this->removeButtonTitle, '#', ['class' => 'btn btn-default fileinput-exists', 'data-dismiss' => 'fileinput']), Html::endTag('div'), Html::endTag('div')]) . "\n";
 }