This is an automated email from the ASF dual-hosted git repository.

nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 7583482a16 Fixed: Synchronize renderTextField and makeHyperlingString 
macro (OFBIZ-13183) (OFBIZ-12940)
7583482a16 is described below

commit 7583482a160635d5560368958e17f1064d08ca36
Author: Nicolas Malin <nicolas.ma...@nereide.fr>
AuthorDate: Mon Apr 28 14:32:39 2025 +0200

    Fixed: Synchronize renderTextField and makeHyperlingString macro 
(OFBIZ-13183) (OFBIZ-12940)
    
    After improvement 'Form inputs: use "required" attribute on mandatory 
fields, validation breaks if "required-field-style" is not empty' (OFBIZ-13183) 
and 'Support "text" attribute on hyperlinks in forms' (OFBIZ-12940), 
renderTextField and makeHyperlingString macro are non synchronised between html 
library and other type (cvs, text, xls, xml and fo).
    
    We propagate macro modifications to other types.
---
 themes/common-theme/template/macro/CsvFormMacroLibrary.ftl  | 6 ++++--
 themes/common-theme/template/macro/FoFormMacroLibrary.ftl   | 6 ++++--
 themes/common-theme/template/macro/TextFormMacroLibrary.ftl | 8 +++++---
 themes/common-theme/template/macro/XlsFormMacroLibrary.ftl  | 6 ++++--
 themes/common-theme/template/macro/XmlFormMacroLibrary.ftl  | 6 ++++--
 5 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/themes/common-theme/template/macro/CsvFormMacroLibrary.ftl 
b/themes/common-theme/template/macro/CsvFormMacroLibrary.ftl
index 85e60d5ec4..ddf3b89137 100644
--- a/themes/common-theme/template/macro/CsvFormMacroLibrary.ftl
+++ b/themes/common-theme/template/macro/CsvFormMacroLibrary.ftl
@@ -24,7 +24,9 @@ under the License.
 </#macro>
 <#macro renderHyperlinkField></#macro>
 
-<#macro renderTextField name className alert value textSize maxlength id event 
action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex readonly 
placeholder="" delegatorName="default"><@renderField value /></#macro>
+<#macro renderTextField type pattern name className alert value="" textSize="" 
maxlength="" id="" event="" action=""
+disabled=false clientAutocomplete="" ajaxUrl="" ajaxEnabled="" mask="" 
tabindex="" readonly="" required=false
+placeholder="" delegatorName="default"><@renderField value /></#macro>
 
 <#macro renderTextareaField name className alert cols="" rows="" maxlength="" 
id="" readonly="" value="" visualEditorEnable="" buttons="" tabindex="" 
language="" disabled=false placeholder=""></#macro>
 
@@ -120,7 +122,7 @@ under the License.
 <#macro renderAsterisks requiredField></#macro>
 <#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow></#macro>
 <#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc 
description confirmation><@renderField description /></#macro>
-<#macro makeHyperlinkString hiddenFormName imgSrc imgTitle title alternate 
linkUrl description linkStyle="" event="" action="" targetParameters="" 
targetWindow="" confirmation="" uniqueItemName="" height="" width="" 
id=""><@renderField description />,<#rt/></#macro>
+<#macro makeHyperlinkString hiddenFormName imgSrc imgTitle title alternate 
linkUrl description text="" linkStyle="" event="" action="" targetParameters="" 
targetWindow="" confirmation="" uniqueItemName="" height="" width="" 
id=""><@renderField description />,<#rt/></#macro>
 <#macro renderDateRangePicker className alert id name value formName event 
action locale alwaysShowCalendars applyButtonClasses applyLabel autoApply 
buttonClasses cancelButtonClasses cancelLabel clearTitle
         drops linkedCalendars maxSpan maxYear minYear opens 
rangeLastMonthLabel rangeLastWeekLabel rangeNextMonthLabel rangeNextWeekLabel 
rangeThisMonthLabel rangeThisWeekLabel showDropdowns showIsoWeekNumbers 
showRanges showWeekNumbers
         singleDatePicker timePicker timePicker24Hour timePickerIncrement 
timePickerSeconds conditionGroup="" value2="" titleStyle="" 
tabindex=""></#macro>
\ No newline at end of file
diff --git a/themes/common-theme/template/macro/FoFormMacroLibrary.ftl 
b/themes/common-theme/template/macro/FoFormMacroLibrary.ftl
index 730df8314d..bd2bfbdd9e 100644
--- a/themes/common-theme/template/macro/FoFormMacroLibrary.ftl
+++ b/themes/common-theme/template/macro/FoFormMacroLibrary.ftl
@@ -51,7 +51,9 @@ under the License.
 </#macro>
 <#macro renderHyperlinkField><!--hyper--></#macro>
 
-<#macro renderTextField name className alert value textSize maxlength id event 
action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex readonly 
placeholder="" delegatorName="default"><@makeBlock className value /></#macro>
+<#macro renderTextField type pattern name className alert value="" textSize="" 
maxlength="" id="" event="" action=""
+disabled=false clientAutocomplete="" ajaxUrl="" ajaxEnabled="" mask="" 
tabindex="" readonly="" required=false
+placeholder="" delegatorName="default"><@makeBlock className value /></#macro>
 
 <#macro renderTextareaField name className alert cols="" rows="" maxlength="" 
id="" readonly="" value="" visualEditorEnable="" buttons="" tabindex="" 
language="" disabled=false placeholder=""><@makeBlock className value 
/></#macro>
 
@@ -143,7 +145,7 @@ under the License.
 <#macro formatBoundaryComment boundaryType widgetType widgetName></#macro>
 <#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow></#macro>
 <#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc 
description><@renderField description /></#macro>
-<#macro makeHyperlinkString hiddenFormName imgSrc imgTitle title alternate 
linkUrl description linkStyle="" event="" action="" targetParameters="" 
targetWindow="" confirmation="" uniqueItemName="" height="" width="" 
id=""><@makeBlock linkStyle description /></#macro>
+<#macro makeHyperlinkString hiddenFormName imgSrc imgTitle title alternate 
linkUrl description text="" linkStyle="" event="" action="" targetParameters="" 
targetWindow="" confirmation="" uniqueItemName="" height="" width="" 
id=""><@makeBlock linkStyle description /></#macro>
 <#macro renderTooltip tooltip tooltipStyle></#macro>
 <#macro renderAsterisks requiredField></#macro>
 <#macro renderDateRangePicker className alert id name value formName event 
action locale alwaysShowCalendars applyButtonClasses applyLabel autoApply 
buttonClasses cancelButtonClasses cancelLabel clearTitle
diff --git a/themes/common-theme/template/macro/TextFormMacroLibrary.ftl 
b/themes/common-theme/template/macro/TextFormMacroLibrary.ftl
index c4223d4f0f..010b3d3b26 100644
--- a/themes/common-theme/template/macro/TextFormMacroLibrary.ftl
+++ b/themes/common-theme/template/macro/TextFormMacroLibrary.ftl
@@ -24,7 +24,9 @@ under the License.
 </#macro>
 <#macro renderHyperlinkField></#macro>
 
-<#macro renderTextField name className alert value textSize maxlength id event 
action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex readonly 
placeholder="" delegatorName="default"><@renderField value /></#macro>
+<#macro renderTextField type pattern name className alert value="" textSize="" 
maxlength="" id="" event="" action=""
+disabled=false clientAutocomplete="" ajaxUrl="" ajaxEnabled="" mask="" 
tabindex="" readonly="" required=false
+placeholder="" delegatorName="default"><@renderField value /></#macro>
 
 <#macro renderTextareaField name className alert cols="" rows="" maxlength="" 
id="" readonly="" value="" visualEditorEnable="" buttons="" tabindex="" 
language="" disabled=false placeholder=""><@renderField value /></#macro>
 
@@ -114,12 +116,12 @@ under the License.
 <#macro renderFieldGroupClose style id title></#macro>
 
 <#macro renderHyperlinkTitle name title showSelectAll="N"></#macro>
-<#macro renderSortField style title linkUrl ajaxEnabled 
tooltip=""><@renderFieldTitle style title /></#macro>
+<#macro renderSortField style title linkUrl ajaxEnabled 
tooltip=""><@renderFieldTitle style title ""/></#macro>
 <#macro formatBoundaryComment boundaryType widgetType widgetName></#macro>
 <#macro renderAsterisks requiredField>*</#macro>
 <#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow></#macro>
 <#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc 
description confirmation><@renderField description /></#macro>
-<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title 
targetParameters alternate linkUrl targetWindow description confirmation 
uniqueItemName="" height="" width="" id=""><@renderField description /></#macro>
+<#macro makeHyperlinkString hiddenFormName imgSrc imgTitle title alternate 
linkUrl description text="" linkStyle="" event="" action="" targetParameters="" 
targetWindow="" confirmation="" uniqueItemName="" height="" width="" 
id=""><@renderField description /></#macro>
 <#macro renderDateRangePicker className alert id name value formName event 
action locale alwaysShowCalendars applyButtonClasses applyLabel autoApply 
buttonClasses cancelButtonClasses cancelLabel clearTitle
 drops linkedCalendars maxSpan maxYear minYear opens rangeLastMonthLabel 
rangeLastWeekLabel rangeNextMonthLabel rangeNextWeekLabel rangeThisMonthLabel 
rangeThisWeekLabel showDropdowns showIsoWeekNumbers showRanges showWeekNumbers
 singleDatePicker timePicker timePicker24Hour timePickerIncrement 
timePickerSeconds conditionGroup="" value2="" titleStyle="" 
tabindex=""></#macro>
\ No newline at end of file
diff --git a/themes/common-theme/template/macro/XlsFormMacroLibrary.ftl 
b/themes/common-theme/template/macro/XlsFormMacroLibrary.ftl
index 375d5acf48..a21b73c0f8 100644
--- a/themes/common-theme/template/macro/XlsFormMacroLibrary.ftl
+++ b/themes/common-theme/template/macro/XlsFormMacroLibrary.ftl
@@ -30,7 +30,9 @@ under the License.
 </#macro>
 <#macro renderHyperlinkField></#macro>
 
-<#macro renderTextField name className alert value textSize maxlength id event 
action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex readonly 
placeholder="" delegatorName="default"><@renderItemField value "txf" 
className/></#macro>
+<#macro renderTextField type pattern name className alert value="" textSize="" 
maxlength="" id="" event="" action=""
+disabled=false clientAutocomplete="" ajaxUrl="" ajaxEnabled="" mask="" 
tabindex="" readonly="" required=false
+placeholder="" delegatorName="default"><@renderItemField value "txf" 
className/></#macro>
 
 <#macro renderTextareaField name className alert cols="" rows="" maxlength="" 
id="" readonly="" value="" visualEditorEnable="" buttons="" tabindex="" 
language="" disabled=false placeholder=""></#macro>
 
@@ -154,7 +156,7 @@ under the License.
 
 <#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow></#macro>
 <#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc 
description confirmation><td>${description!}</td></#macro>
-<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title 
targetParameters alternate linkUrl targetWindow description confirmation 
uniqueItemName="" height="" width="" id=""></#macro>
+<#macro makeHyperlinkString hiddenFormName imgSrc imgTitle title alternate 
linkUrl description text="" linkStyle="" event="" action="" targetParameters="" 
targetWindow="" confirmation="" uniqueItemName="" height="" width="" id="">  
</#macro>
 <#macro renderDateRangePicker className alert id name value formName event 
action locale alwaysShowCalendars applyButtonClasses applyLabel autoApply 
buttonClasses cancelButtonClasses cancelLabel clearTitle
 drops linkedCalendars maxSpan maxYear minYear opens rangeLastMonthLabel 
rangeLastWeekLabel rangeNextMonthLabel rangeNextWeekLabel rangeThisMonthLabel 
rangeThisWeekLabel showDropdowns showIsoWeekNumbers showRanges showWeekNumbers
 singleDatePicker timePicker timePicker24Hour timePickerIncrement 
timePickerSeconds conditionGroup="" value2="" titleStyle="" 
tabindex=""></#macro>
\ No newline at end of file
diff --git a/themes/common-theme/template/macro/XmlFormMacroLibrary.ftl 
b/themes/common-theme/template/macro/XmlFormMacroLibrary.ftl
index 0af6fd0937..a80703331f 100644
--- a/themes/common-theme/template/macro/XmlFormMacroLibrary.ftl
+++ b/themes/common-theme/template/macro/XmlFormMacroLibrary.ftl
@@ -40,7 +40,9 @@ under the License.
 </#macro>
 <#macro renderHyperlinkField></#macro>
 
-<#macro renderTextField name className alert value textSize maxlength id event 
action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex readonly 
placeholder="" delegatorName="default"><@renderField value/></#macro>
+<#macro renderTextField type pattern name className alert value="" textSize="" 
maxlength="" id="" event="" action=""
+disabled=false clientAutocomplete="" ajaxUrl="" ajaxEnabled="" mask="" 
tabindex="" readonly="" required=false
+placeholder="" delegatorName="default"><@renderField value/></#macro>
 
 <#macro renderTextareaField name className alert cols="" rows="" maxlength="" 
id="" readonly="" value="" visualEditorEnable="" buttons="" tabindex="" 
language="" disabled=false placeholder=""><@renderField value/></#macro>
 
@@ -116,7 +118,7 @@ under the License.
 <#macro formatBoundaryComment boundaryType widgetType widgetName></#macro>
 <#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow></#macro>
 <#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc 
description confirmation><@renderField description /></#macro>
-<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title 
targetParameters alternate linkUrl targetWindow description confirmation 
uniqueItemName="" height="" width="" id=""><@renderField description /></#macro>
+<#macro makeHyperlinkString hiddenFormName imgSrc imgTitle title alternate 
linkUrl description text="" linkStyle="" event="" action="" targetParameters="" 
targetWindow="" confirmation="" uniqueItemName="" height="" width="" 
id=""><@renderField description /></#macro>
 <#macro renderTooltip tooltip tooltipStyle></#macro>
 <#macro renderAsterisks requiredField></#macro>
 <#macro renderDateRangePicker className alert id name value formName event 
action locale alwaysShowCalendars applyButtonClasses applyLabel autoApply 
buttonClasses cancelButtonClasses cancelLabel clearTitle

Reply via email to