This is an automated email from the ASF dual-hosted git repository. deepak pushed a commit to branch release22.01 in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release22.01 by this push: new 878c96f4a4 Fixed: Temporal Expression screen date time picker not working due to duplicate id. (OFBIZ-12695) 878c96f4a4 is described below commit 878c96f4a47bca1b1dd775103a3de2556e3cb3af Author: Deepak Dixit <deepak.di...@hotwax.co> AuthorDate: Mon Sep 26 11:43:04 2022 +0530 Fixed: Temporal Expression screen date time picker not working due to duplicate id. (OFBIZ-12695) Added id in DateRange macro, and passed the unique id from temporal expression tempalte. Now DateRange and Frequency working fine --- framework/webtools/template/tempexpr/TempExprMacros.ftl | 6 +++--- themes/common-theme/template/includes/CommonMacros.ftl | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/framework/webtools/template/tempexpr/TempExprMacros.ftl b/framework/webtools/template/tempexpr/TempExprMacros.ftl index 3a5b01202a..e46ce57c8b 100644 --- a/framework/webtools/template/tempexpr/TempExprMacros.ftl +++ b/framework/webtools/template/tempexpr/TempExprMacros.ftl @@ -36,13 +36,13 @@ your template file: <tr> <td class="label">${uiLabelMap.CommonFrom}</td> <td> - <@DateField formName=formName fieldName="date1" fieldValue=fromDate/> + <@DateField id="dateRange_date1" formName=formName fieldName="date1" fieldValue=fromDate/> </td> </tr> <tr> <td class="label">${uiLabelMap.CommonTo}</td> <td> - <@DateField formName=formName fieldName="date2" fieldValue=toDate/> + <@DateField id="dateRange_date2" formName=formName fieldName="date2" fieldValue=toDate/> </td> </tr> </#macro> @@ -104,7 +104,7 @@ your template file: <tr> <td class="label">${uiLabelMap.CommonFrom}</td> <td> - <@DateField formName=formName fieldName="date1" fieldValue=fromDate/> + <@DateField id="frequency_date1" formName=formName fieldName="date1" fieldValue=fromDate/> </td> </tr> <tr> diff --git a/themes/common-theme/template/includes/CommonMacros.ftl b/themes/common-theme/template/includes/CommonMacros.ftl index 4548c8d227..be58ff3e38 100644 --- a/themes/common-theme/template/includes/CommonMacros.ftl +++ b/themes/common-theme/template/includes/CommonMacros.ftl @@ -29,11 +29,11 @@ your template file: <#macro NullMacro></#macro> -<#macro DateField formName="" fieldName="" fieldValue="" fieldClass=""> +<#macro DateField id=fieldName formName="" fieldName="" fieldValue="" fieldClass=""> <#if javaScriptEnabled> <@htmlTemplate.renderDateTimeField name="${fieldName}" event="${event!}" action="${action!}" className="${fieldClass!''}" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${fieldValue!''}" - size="25" maxlength="30" id="${fieldName}1" dateType="date" shortDateInput=false timeDropdownParamName="" + size="25" maxlength="30" id="${id}" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/>