svn commit: r771146 - in /ofbiz/trunk/framework/widget: src/org/ofbiz/widget/form/MacroFormRenderer.java templates/htmlFormMacroLibrary.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r771146 - in /ofbiz/trunk/framework/widget: src/org/ofbiz/widget/form/MacroFormRenderer.java templates/htmlFormMacroLibrary.ftl

lektran
Author: lektran
Date: Sun May  3 23:04:58 2009
New Revision: 771146

URL: http://svn.apache.org/viewvc?rev=771146&view=rev
Log:
Fixed a FIXME, moved \n -> <BR/> replacement from the renderer to the html macro

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
    ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=771146&r1=771145&r2=771146&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Sun May  3 23:04:58 2009
@@ -173,9 +173,6 @@
          idName += "_" + modelForm.getRowCount();
         }
         String description = displayField.getDescription(context);
-        // FIXME: this is only valid for html and should be moved outside of this class
-        // Replace new lines with <br/>
-        description = description.replaceAll("\n", "<br/>");
 
         ModelFormField.InPlaceEditor inPlaceEditor = displayField.getInPlaceEditor();
         boolean ajaxEnabled = inPlaceEditor != null && this.javaScriptEnabled;

Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=771146&r1=771145&r2=771146&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Sun May  3 23:04:58 2009
@@ -28,7 +28,7 @@
         <span <#if idName?has_content>id="${idName}"</#if> <@renderClass class alert />><#t/>
     </#if>
     <#if description?has_content>
-        ${description}<#t/>
+        ${description?replace("\n", "<br/>")}<#t/>
     <#else>
         &nbsp;<#t/>
     </#if>