Author: sascharodekamp Date: Fri Jun 29 09:31:22 2012 New Revision: 1355291
URL: http://svn.apache.org/viewvc?rev=1355291&view=rev Log: Render checkbox field as same behavior as radiobox (https://issues.apache.org/jira/browse/OFBIZ-4948): A patch from Leon: when rendering a radio field in form widget, the generated html codes looks like: <span><input type="radio" ...>blahblah</span>. The radio box and its description are wrapped by <span> and it's easy to change css style for both of them (radio and description), not only for radio type input. But the check box is rendered in another way without <span> around. Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1355291&r1=1355290&r2=1355291&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original) +++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Fri Jun 29 09:31:22 2012 @@ -262,9 +262,10 @@ if(disa && document.styleSheets) <#macro renderCheckField items className alert id allChecked currentValue name event action> <#list items as item> -<input type="checkbox"<#if (item_index == 0)> id="${id}"</#if> <@renderClass className alert /><#rt/> +<span <@renderClass className alert />><#rt/> +<input type="checkbox"<#if (item_index == 0)> id="${id}"</#if><#rt/> <#if allChecked?has_content && allChecked> checked="checked" <#elseif allChecked?has_content && !allChecked><#elseif currentValue?has_content && currentValue==item.value> checked="checked"</#if> name="${name?default("")?html}" value="${item.value?default("")?html}"<#if event?has_content> ${event}="${action}"</#if>/><#rt/> -${item.description?default("")} +${item.description?default("")}</span> </#list> </#macro>