﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35721	widget template attrs.html needs space for attrs with True value	Yingjie Lan		"If you have a hidden input widget w with w.attrs being {'disabled':True, 'id':'myinput'}, you will get this:

{{{
<input type=""hidden"" name=""myfield""disabledid=""myinput"">
}}}

The desired output should be: 

{{{
<input type=""hidden"" name=""myfield"" disabled id=""myinput"">
}}}

To fix this, the template file attrs.html needs to add a space before {{ name }} as follows:

{{{
{% for name, value in widget.attrs.items %}{% if value is not False %} {{ name }}{% if value is not True %}=""{{ value|stringformat:'s' }}""{% endif %}{% endif %}{% endfor %}
}}}"	Bug	closed	Forms	5.0	Normal	invalid	widget attrs template		Unreviewed	1	0	0	0	1	0
