[ 
https://issues.apache.org/jira/browse/OFBIZ-3702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861945#action_12861945
 ] 

chris snow commented on OFBIZ-3702:
-----------------------------------

Perhaps the solution would be to change the renderFieldTitle methods as below.  
The changes below only add a new optional parameter for the fieldHelpText 
leaving the title parameter unchanged, this would minimise the impact to 
existing code, but is slightly confusing because the title parameter does not 
provide the content for the span's title attribute.

Any thoughts?

{code}
HtmlFormMacroLibrary.ftl 

<#macro renderFieldTitle style title fieldHelpText="">
    <#if fieldHelpText?has_content>
        <span title="${fieldHelpText}"><#t/>
    </#if>
    <#if style?has_content>
        <span class="${style}"><#t/>
    </#if>
    ${title}<#t/>
    <#if style?has_content>
        </span><#t/>
    </#if>
    <#if fieldHelpText?has_content>
        </span><#t/>
    </#if>    
</#macro>

foFormMacroLibrary.ftl

<#macro renderFieldTitle style title 
fieldHelpText="">${title?default("")}</#macro>

xmlFormMacroLibrary.ftl

<#macro renderFieldTitle style title fieldHelpText=""></#macro>

textFormMacroLibrary.ftl

<#macro renderFieldTitle style title fieldHelpText=""><@renderField title 
/></#macro>

csvFormMacroLibrary.ftl

<#macro renderFieldTitle style title fieldHelpText=""><@renderField title />, 
</#macro>
{code}

Many thanks,

Chris

> provide better user help
> ------------------------
>
>                 Key: OFBIZ-3702
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3702
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Release Candidate Branch 10.04, SVN trunk
>            Reporter: chris snow
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: entity_field_tooltip_screenshot.png, 
> fieldLabelTooltip.png, fieldLabelTooltip2.png, 
> fieldLabelTooltip2__DO_NOT_COMMIT.patch, 
> fieldLabelTooltip_DO_NOT_COMMIT.patch, fieldTooltipHelp3.patch, 
> fieldTooltipHelp4.patch, help.png, product_entitymodel.patch, 
> tooltip_help_DO_NOT_COMMIT.patch
>
>
> Please see http://n4.nabble.com/Providing-users-with-help-td1840416.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to