N°3670 Add new file upload button

This commit is contained in:
Stephen Abello
2021-02-10 17:17:00 +01:00
parent d08adc43c1
commit 3be360dfb9
4 changed files with 45 additions and 8 deletions

View File

@@ -24,6 +24,8 @@ class FileSelect extends UIBlock
private $sFileName;
/** @var string */
private $sButtonText;
/** @var bool */
private $bShowFilename;
public function __construct(string $sName, string $sId = null)
{
@@ -31,6 +33,7 @@ class FileSelect extends UIBlock
$this->sName = $sName;
$this->sFileName = Dict::S('UI:InputFile:NoFileSelected');
$this->sButtonText = Dict::S('UI:InputFile:SelectFile');
$this->bShowFilename = true;
}
/**
@@ -80,4 +83,25 @@ class FileSelect extends UIBlock
{
return $this->sName;
}
/**
* @param bool $bShowFilename
*
* @return $this
*/
public function SetShowFilename(bool $bShowFilename)
{
$this->bShowFilename = $bShowFilename;
return $this;
}
/**
* @return bool
*/
public function GetShowFilename(): bool
{
return $this->bShowFilename;
}
}