Skip to content

Commit

Permalink
DefaultFormRenderer: wrapper for hidden fields changed from <div> to …
Browse files Browse the repository at this point in the history
…none
  • Loading branch information
dg committed Jun 1, 2016
1 parent 024ce6e commit bcb0685
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Forms/Rendering/DefaultFormRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class DefaultFormRenderer implements Nette\Forms\IFormRenderer
],

'hidden' => [
'container' => 'div',
'container' => NULL,
],
];

Expand Down
2 changes: 1 addition & 1 deletion tests/Forms/Forms.renderer.1.expect
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,5 @@
</table>
</fieldset>

<div><input type="hidden" name="userid" value="231"></div>
<input type="hidden" name="userid" value="231">
</form>
2 changes: 1 addition & 1 deletion tests/Forms/Forms.renderer.2.expect
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@
</dl>

</div>
<div><input type="hidden" name="userid" value="231"></div>
<input type="hidden" name="userid" value="231">
</form>
2 changes: 1 addition & 1 deletion tests/Forms/Forms.renderer.3.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ Assert::match('<form action="" method="post">
</tr>
</table>
<div><input type="hidden" name="userid" value=""><!--[if IE]><input type=IEbug disabled style="display:none"><![endif]--></div>
<input type="hidden" name="userid" value=""><!--[if IE]><input type=IEbug disabled style="display:none"><![endif]-->
</form>', $form->__toString(TRUE));
4 changes: 2 additions & 2 deletions tests/Forms/Forms.renderer.4.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $form->addSubmit('submit', 'Send');
$form->fireEvents();

Assert::match('<form action="link" method="get">
<div><input type="hidden" name="a" value="b"><input type="hidden" name="c[]" value="d"></div>
<input type="hidden" name="a" value="b"><input type="hidden" name="c[]" value="d">
<table>
<tr>
Expand All @@ -28,7 +28,7 @@ Assert::match('<form action="link" method="get">
</tr>
</table>
<div><input type="hidden" name="userid" value=""><!--[if IE]><input type=IEbug disabled style="display:none"><![endif]--></div>
<input type="hidden" name="userid" value=""><!--[if IE]><input type=IEbug disabled style="display:none"><![endif]-->
</form>', $form->__toString(TRUE));

Assert::same('link?a=b&c[]=d', $form->getAction());

0 comments on commit bcb0685

Please sign in to comment.