From 66abbccc8a5f9ce533c8e278a509307f1e5c27cc Mon Sep 17 00:00:00 2001 From: Dalibor Korpar Date: Thu, 24 Oct 2024 11:28:01 +0200 Subject: [PATCH] compatibility with nette forms 3.2.5 --- composer.json | 2 +- src/Traits/BootstrapContainerTrait.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 5af38f6..c65f76a 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ ], "require": { "php": ">=8.1", - "nette/forms": "3.2.4", + "nette/forms": "3.2.5", "nette/application": "^3.0" }, "require-dev": { diff --git a/src/Traits/BootstrapContainerTrait.php b/src/Traits/BootstrapContainerTrait.php index baa46aa..b09543c 100644 --- a/src/Traits/BootstrapContainerTrait.php +++ b/src/Traits/BootstrapContainerTrait.php @@ -184,8 +184,11 @@ public function addBootstrapDateTime(string $name, $label): DateTimeInput * @param Html|string|null $label * @return TextInput */ - public function addEmail(string $name, $label = null): NetteTextInput - { + public function addEmail( + string $name, + string|\Stringable|null $label = null, + int $maxLength = 255 + ): NetteTextInput { return $this->addText($name, $label) ->setNullable(BootstrapForm::$allwaysUseNullable) ->addRule(Form::Email);