nextras / forms-rendering

Rendering helpers for Nette Framework Forms.
https://nextras.org
MIT License
14 stars 4 forks source link

Fix Input Macros #12

Closed jtojnar closed 8 months ago

jtojnar commented 1 year ago

The demo has not been updated to use the new Latte extension so the input and label macros were picked from Nette\Bridges\FormsLatte\FormsExtension. But even if we add our extension the macros from FormsExtension will take precedence. Let’s add a prefix.

The template nodes themselves passed incorrect arguments – .var is not a thing in Latte 3.

On top of that, an incorrect class name would be used Nextras\FormsRendering\LatteTags instead of the Bootstrap 3 specific subclass.

jtojnar commented 1 year ago

It looks like Nette now registers the default form tags only when Template is being created, which means any tags from Latte extensions registered in container will end up being overwritten.

@hrach Are you okay with renaming the tags so we can move forward?

hrach commented 8 months ago

@jtojnar Wow, great fixes. To anybody wanting the old behavior, the fix is to create a custom TemplateFactory that does not do that, and a custom extension that register the nodes with the old names.