Merge remote-tracking branch 'origin/support/3.0' into develop

This commit is contained in:
Molkobain
2022-01-17 19:21:52 +01:00
16 changed files with 159 additions and 90 deletions

View File

@@ -25,6 +25,11 @@ class InputWithLabel extends UIBlock
protected $oInput;
/** @var bool Label before input ? */
protected $bBeforeInput;
/**
* @var string $sDescription for tooltip
* @since 3.0.1
*/
protected $sDescription;
/**
* @param string $sLabel
@@ -102,4 +107,32 @@ class InputWithLabel extends UIBlock
$this->sLabel = $sLabel;
return $this;
}
/**
* @since 3.0.1
* @return mixed
*/
public function GetDescription()
{
return $this->sDescription;
}
/**
* @since 3.0.1
* @param mixed $sDescription
*/
public function SetDescription($sDescription)
{
$this->sDescription = $sDescription;
return $this;
}
/**
* @since 3.0.1
* @return bool
*/
public function HasDescription(): bool
{
return strlen($this->sDescription) > 0;
}
}

View File

@@ -18,6 +18,11 @@ trait tInputLabel
protected $bIsLabelBefore = true;
/** @var string|null Label to display with the input (null for no label) */
protected $sLabel = null;
/**
* @var string $sDescription for tooltip
* @since 3.0.1
*/
protected $sDescription;
/**
* @return bool
@@ -85,4 +90,27 @@ trait tInputLabel
{
return $this->sLabel != null;
}
/**
* @return mixed
*/
public function GetDescription()
{
return $this->sDescription;
}
/**
* @param mixed $sDescription
*/
public function SetDescription($sDescription)
{
$this->sDescription = $sDescription;
return $this;
}
/**
* @return bool
*/
public function HasDescription(): bool
{
return $this->sDescription != null;
}
}