Skip to content

Commit 6075edf

Browse files
committed
FormMacros: {label} is AUTO_EMPTY
1 parent 4bfa1c2 commit 6075edf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Bridges/FormsLatte/FormMacros.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static function install(Latte\Compiler $compiler)
3333
$me = new static($compiler);
3434
$me->addMacro('form', [$me, 'macroForm'], 'echo Nette\Bridges\FormsLatte\Runtime::renderFormEnd($_form)');
3535
$me->addMacro('formContainer', [$me, 'macroFormContainer'], '$formContainer = $_form = array_pop($_formStack)');
36-
$me->addMacro('label', [$me, 'macroLabel'], [$me, 'macroLabelEnd']);
36+
$me->addMacro('label', [$me, 'macroLabel'], [$me, 'macroLabelEnd'], NULL, self::AUTO_EMPTY);
3737
$me->addMacro('input', [$me, 'macroInput']);
3838
$me->addMacro('name', [$me, 'macroName'], [$me, 'macroNameEnd'], [$me, 'macroNameAttr']);
3939
$me->addMacro('inputError', [$me, 'macroInputError']);

tests/Forms.Latte/templates/forms.latte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{inputError $form[$name]}
1212
{/foreach}
1313

14-
{label $form[username]/}
14+
{label $form[username]}
1515

1616
<LABEL n:name="username" title=hello>Name</LABEL>
1717
<input value=val type class="hello" n:name="username">

0 commit comments

Comments
 (0)