diff --git a/src/Bridges/FormsLatte/Runtime.php b/src/Bridges/FormsLatte/Runtime.php index 0de03a92b..1e1eb3605 100644 --- a/src/Bridges/FormsLatte/Runtime.php +++ b/src/Bridges/FormsLatte/Runtime.php @@ -68,10 +68,6 @@ public static function renderFormEnd(Form $form, bool $withTags = true): string } } - if (iterator_count($form->getComponents(true, Nette\Forms\Controls\TextInput::class)) < 2) { - $s .= "\n"; - } - return $s . ($withTags ? $form->getElementPrototype()->endTag() . "\n" : ''); } diff --git a/src/Forms/Rendering/DefaultFormRenderer.php b/src/Forms/Rendering/DefaultFormRenderer.php index 64da5e47c..c5745e300 100644 --- a/src/Forms/Rendering/DefaultFormRenderer.php +++ b/src/Forms/Rendering/DefaultFormRenderer.php @@ -205,10 +205,6 @@ public function renderEnd(): string } } - if (iterator_count($this->form->getComponents(true, Nette\Forms\Controls\TextInput::class)) < 2) { - $s .= ''; - } - if ($s) { $s = $this->getWrapper('hidden container')->setHtml($s) . "\n"; } diff --git a/tests/Forms.Latte2/expected/FormMacros.button.html b/tests/Forms.Latte2/expected/FormMacros.button.html index 97a6686cc..30763a37a 100644 --- a/tests/Forms.Latte2/expected/FormMacros.button.html +++ b/tests/Forms.Latte2/expected/FormMacros.button.html @@ -6,5 +6,4 @@ -%A% - + \ No newline at end of file diff --git a/tests/Forms.Latte2/expected/FormMacros.forms.html b/tests/Forms.Latte2/expected/FormMacros.forms.html index 76564c2c4..8dffbcaf1 100644 --- a/tests/Forms.Latte2/expected/FormMacros.forms.html +++ b/tests/Forms.Latte2/expected/FormMacros.forms.html @@ -55,13 +55,11 @@ - -
+ + + + @@ -115,10 +110,9 @@ - - + \ No newline at end of file diff --git a/tests/Forms.Latte2/expected/FormMacros.get.html b/tests/Forms.Latte2/expected/FormMacros.get.html index bf19a13ea..e37282817 100644 --- a/tests/Forms.Latte2/expected/FormMacros.get.html +++ b/tests/Forms.Latte2/expected/FormMacros.get.html @@ -1,7 +1,5 @@ - + + \ No newline at end of file diff --git a/tests/Forms.Latte3/expected/forms.button.html b/tests/Forms.Latte3/expected/forms.button.html index 97a6686cc..10de24465 100644 --- a/tests/Forms.Latte3/expected/forms.button.html +++ b/tests/Forms.Latte3/expected/forms.button.html @@ -6,5 +6,4 @@ -%A% diff --git a/tests/Forms.Latte3/expected/forms.get.html b/tests/Forms.Latte3/expected/forms.get.html index bf19a13ea..e37282817 100644 --- a/tests/Forms.Latte3/expected/forms.get.html +++ b/tests/Forms.Latte3/expected/forms.get.html @@ -1,7 +1,5 @@ - + + \ No newline at end of file diff --git a/tests/Forms.Latte3/expected/forms.html b/tests/Forms.Latte3/expected/forms.html index 485417c52..42933f658 100644 --- a/tests/Forms.Latte3/expected/forms.html +++ b/tests/Forms.Latte3/expected/forms.html @@ -50,13 +50,11 @@ - - + + + + @@ -111,11 +106,10 @@ - - + \ No newline at end of file diff --git a/tests/Forms/Forms.renderer.3.phpt b/tests/Forms/Forms.renderer.3.phpt deleted file mode 100644 index 2dfcbec54..000000000 --- a/tests/Forms/Forms.renderer.3.phpt +++ /dev/null @@ -1,35 +0,0 @@ -addHidden('userid'); -$form->addSubmit('submit', 'Send'); - -$form->onSuccess[] = function () {}; -$form->fireEvents(); - -Assert::match('', $form->__toString(true)); diff --git a/tests/Forms/Forms.renderer.4.phpt b/tests/Forms/Forms.renderer.4.phpt index 9df4f858a..9f22252ce 100644 --- a/tests/Forms/Forms.renderer.4.phpt +++ b/tests/Forms/Forms.renderer.4.phpt @@ -38,7 +38,7 @@ Assert::match('', $form->__toString(true)); Assert::same('link?a=b&c[]=d&list[0]=1', $form->getAction()); diff --git a/tests/Forms/Forms.renderer.6.phpt b/tests/Forms/Forms.renderer.6.phpt index 5a5f050e5..f96d943a3 100644 --- a/tests/Forms/Forms.renderer.6.phpt +++ b/tests/Forms/Forms.renderer.6.phpt @@ -37,7 +37,7 @@ Assert::match('', $form->__toString(true)); Assert::same('link', $form->getAction());