From a055e665614f10562c9b6a48764fe4c8ef502e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Konvi=C4=8Dka?= Date: Mon, 29 Jun 2026 21:02:16 +0200 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20vykresluj=20odkr=C3=BDvac=C3=AD=20sc?= =?UTF-8?q?ript=20u=20ka=C5=BEd=C3=A9ho=20controlu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Controls/PasswordRevealInput.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Controls/PasswordRevealInput.php b/src/Controls/PasswordRevealInput.php index 9e79d36..9d01666 100644 --- a/src/Controls/PasswordRevealInput.php +++ b/src/Controls/PasswordRevealInput.php @@ -14,8 +14,6 @@ class PasswordRevealInput extends TextInput public const string INPUT_CLASS = 'toggle-password-input'; public const string TOGGLE_CLASS = 'toggle-password-reveal'; - private static bool $scriptRendered = false; - public function __construct($label = null, ?int $maxLength = null) { parent::__construct($label, $maxLength); @@ -37,12 +35,8 @@ public function getControl(): Html $group = Html::el('div') ->setAttribute('class', 'input-group') ->addHtml($input) - ->addHtml($button); - - if (!self::$scriptRendered) { - self::$scriptRendered = true; - $group->addHtml(self::getScript()); - } + ->addHtml($button) + ->addHtml(self::getScript()); return $group; } From 9159cd4f2d87c1a38476ea88653437150f33e520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Konvi=C4=8Dka?= Date: Mon, 29 Jun 2026 21:44:44 +0200 Subject: [PATCH 2/2] fix: vypisuj ulozenou hodnotu i pro type=password --- src/Controls/PasswordRevealInput.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Controls/PasswordRevealInput.php b/src/Controls/PasswordRevealInput.php index 9d01666..3714ff8 100644 --- a/src/Controls/PasswordRevealInput.php +++ b/src/Controls/PasswordRevealInput.php @@ -25,6 +25,7 @@ public function __construct($label = null, ?int $maxLength = null) public function getControl(): Html { $input = parent::getControl(); + $input->value = $this->getRenderedValue(); $button = Html::el('button') ->setAttribute('type', 'button')