Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

Commit cfa43f2

Browse files
Merge pull request #138 from schoradt/master
Configure template in FileUpload like in FileUploadUI
2 parents 9e24da0 + bf02854 commit cfa43f2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/FileUpload.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ class FileUpload extends BaseUpload
3030
*/
3131
public $useDefaultButton = true;
3232

33+
/**
34+
* @var string the upload view path to render the js upload template
35+
*/
36+
public $uploadButtonTemplateView = 'uploadButton';
37+
3338
/**
3439
* @inheritdoc
3540
*/
@@ -51,7 +56,7 @@ public function run()
5156
: Html::fileInput($this->name, $this->value, $this->options);
5257

5358
echo $this->useDefaultButton
54-
? $this->render('uploadButton', ['input' => $input])
59+
? $this->render($this->uploadButtonTemplateView, ['input' => $input])
5560
: $input;
5661

5762
$this->registerClientScript();

0 commit comments

Comments
 (0)