diff --git a/sources/application/UI/Base/Component/Input/Select/SelectOption.php b/sources/application/UI/Base/Component/Input/Select/SelectOption.php index 0dff9064c..6c57cfea2 100644 --- a/sources/application/UI/Base/Component/Input/Select/SelectOption.php +++ b/sources/application/UI/Base/Component/Input/Select/SelectOption.php @@ -20,6 +20,8 @@ class SelectOption extends UIBlock protected $sLabel; /** @var bool */ protected $bSelected; + /** @var bool */ + protected $bDisabled; /** * @return string @@ -76,6 +78,25 @@ class SelectOption extends UIBlock { $this->bSelected = $bSelected; return $this; + } + + /** + * @return bool + */ + public function IsDisabled(): bool + { + return $this->bDisabled; + } + + /** + * @param bool $bDisabled + * + * @return SelectOption + */ + public function SetDisabled(bool $bDisabled): SelectOption + { + $this->bDisabled = $bDisabled; + return $this; } } \ No newline at end of file diff --git a/sources/application/UI/Base/Component/Input/Select/SelectOptionUIBlockFactory.php b/sources/application/UI/Base/Component/Input/Select/SelectOptionUIBlockFactory.php index 3a4f3d0b4..1ab3d21f7 100644 --- a/sources/application/UI/Base/Component/Input/Select/SelectOptionUIBlockFactory.php +++ b/sources/application/UI/Base/Component/Input/Select/SelectOptionUIBlockFactory.php @@ -21,7 +21,8 @@ class SelectOptionUIBlockFactory extends AbstractUIBlockFactory $oInput->SetValue($sValue) ->SetLabel($sLabel) - ->SetSelected($bSelected); + ->SetSelected($bSelected) + ->SetDisabled(false); return $oInput; } diff --git a/templates/base/components/input/select/selectoption.html.twig b/templates/base/components/input/select/selectoption.html.twig index 1ae2a8cd2..8e4aa7255 100644 --- a/templates/base/components/input/select/selectoption.html.twig +++ b/templates/base/components/input/select/selectoption.html.twig @@ -1,3 +1,3 @@ {# @copyright Copyright (C) 2010-2020 Combodo SARL #} {# @license http://opensource.org/licenses/AGPL-3.0 #} - +