diff --git a/Theme/Backend/Components/AccountGroupSelector/BaseView.php b/Theme/Backend/Components/AccountGroupSelector/BaseView.php index cfad3d6..f8b8975 100644 --- a/Theme/Backend/Components/AccountGroupSelector/BaseView.php +++ b/Theme/Backend/Components/AccountGroupSelector/BaseView.php @@ -23,6 +23,7 @@ use phpOMS\Message\ResponseAbstract; class BaseView extends View { private $id = ''; + private $isRequired = false; public function __construct(ApplicationAbstract $app, RequestAbstract $request, ResponseAbstract $response) { @@ -39,9 +40,15 @@ class BaseView extends View return $this->id; } + public function isRequired() : bool + { + return $this->isRequired; + } + public function render(...$data) : string { $this->id = $data[0]; + $this->required = $data[1] ?? false; return parent::render(); } } \ No newline at end of file diff --git a/Theme/Backend/Components/AccountGroupSelector/base.tpl.php b/Theme/Backend/Components/AccountGroupSelector/base.tpl.php index 0fc78e9..79b990d 100644 --- a/Theme/Backend/Components/AccountGroupSelector/base.tpl.php +++ b/Theme/Backend/Components/AccountGroupSelector/base.tpl.php @@ -13,7 +13,7 @@ +]'= $this->isRequired() ? ' required' : ''; ?>> -
\ No newline at end of file + \ No newline at end of file