toscawidgets/tw2.forms — pull request #10 by clsdaniel (2012-08-04 18:38:09+00:00)
Title: Add jinja2 widget templates

Added full jinja2 templates to widgets.

Genshi can transform a dict into an appropiate string of html attributes, mako emulates this with an extension (mako_util), jinja has a filter that does something similar xmlattr, however this filter does not handle special cases such as checked or selected attributes where the input dictionary has a value of True but the correct html attribute should read checked="checked".

To solve the mentioned issue and to get 100% tests passing this needs a patch to tw2.core which adds a small filter called htmlbools which checks this special cases and accomodates the correct values. This patch has been submited as a pull request to tw2.core.