This is an automated email from the ASF dual-hosted git repository. danwatford pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
commit 810885b3d8c4980f9118dafa9e6b164f9a0e1164 Author: Daniel Watford <dan...@watfordconsulting.com> AuthorDate: Tue Nov 15 11:54:20 2022 +0000 Fixed: Ensure types are converted correctly in FTL templates (OFBIZ-12126) Recent changes in rendering of FTL macro calls changed the types of some parameters from string to boolean to better represent intent. Some corresponding type conversion was missing in the FTL templates. --- themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl b/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl index d1d1f6be1e..156da6d3a4 100644 --- a/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl +++ b/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl @@ -88,14 +88,14 @@ under the License. </textarea><#lt/> </#macro> -<#macro renderDateTimeField name className alert timeDropdownParamName defaultDateTimeString localizedIconTitle timeHourName timeMinutesName minutes isTwelveHour ampmName compositeType isTimeType=false isDateType=false amSelected=false pmSelected=false timeDropdown="" classString="" hour1="" hour2="" shortDateInput="" title="" value="" size="" maxlength="" id="" formName="" mask="" event="" action="" step="" timeValues="" tabindex="" disabled=false isXMLHttpRequest=""> +<#macro renderDateTimeField name className alert timeDropdownParamName defaultDateTimeString localizedIconTitle timeHourName timeMinutesName ampmName compositeType isTimeType=false isDateType=false amSelected=false pmSelected=false timeDropdown="" classString="" isTwelveHour=false hour1="" hour2="" minutes=0 shortDateInput="" title="" value="" size="" maxlength="" id="" formName="" mask="" event="" action="" step="" timeValues="" tabindex="" disabled=false isXMLHttpRequest=""> <span class="view-calendar"> <#local cultureInfo = Static["org.apache.ofbiz.common.JsLanguageFilesMappingUtil"].getFile("datejs", .locale)/> <#local datePickerLang = Static["org.apache.ofbiz.common.JsLanguageFilesMappingUtil"].getFile("jquery", .locale)/> <#local timePicker = "/common/js/node_modules/@chinchilla-software/jquery-ui-timepicker-addon/dist/jquery-ui-timepicker-addon.min.js,/common/js/node_modules/@chinchilla-software/jquery-ui-timepicker-addon/dist/jquery-ui-timepicker-addon.css"/> <#local timePickerLang = Static["org.apache.ofbiz.common.JsLanguageFilesMappingUtil"].getFile("dateTime", .locale)/> <#if !isTimeType > - <input type="text" name="${name}_i18n" <@renderClass className alert /> <@renderDisabled disabled /> + <input type="text" name="${name}_i18n" <@renderClass className alert?c /> <@renderDisabled disabled /> <#if tabindex?has_content> tabindex="${tabindex}"</#if> <#if title?has_content> title="${title}"</#if> <#if value?has_content> value="${value}"</#if> @@ -104,7 +104,7 @@ under the License. <#if id?has_content> id="${id}_i18n"</#if>/><#rt/> <#local className = className + " date-time-picker"/> </#if> - <input type="hidden" name="${name}" <@renderClass className alert /> <@renderDisabled disabled /> + <input type="hidden" name="${name}" <@renderClass className alert?c /> <@renderDisabled disabled /> <#if tabindex?has_content> tabindex="${tabindex}"</#if> <#if event?has_content && action?has_content> ${event}="${action}"</#if><#rt/> <#if title?has_content> title="${title}"</#if> @@ -147,7 +147,7 @@ under the License. </#if> </#if> <input type="hidden" name="${compositeType}" value="Timestamp"/> - <#if isXMLHttpRequest=="true"> + <#if isXMLHttpRequest> <script> initDateTimePicker(document.getElementById("${id}")); </script>