<#-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <#-- To use these macros in your template, insert the following line in your template file: <#include "component://common/webcommon/includes/tempExprMacros.ftl"/> --> <#include "component://common/webcommon/includes/commonMacros.ftl"/> <#assign occurrenceList = Static["org.ofbiz.service.calendar.ExpressionUiHelper"].getOccurrenceList() frequencyTypeList = Static["org.ofbiz.service.calendar.ExpressionUiHelper"].getFrequencyValueList(uiLabelMap) firstDayOfWeek = Static["org.ofbiz.service.calendar.ExpressionUiHelper"].getFirstDayOfWeek(locale) lastDayOfWeek = Static["org.ofbiz.service.calendar.ExpressionUiHelper"].getLastDayOfWeek(locale) /> <#macro DateRange formName="" fromDate="" toDate=""> ${uiLabelMap.CommonFrom} <@DateField formName=formName fieldName="date1" fieldValue=fromDate/> ${uiLabelMap.CommonTo} <@DateField formName=formName fieldName="date2" fieldValue=toDate/> <#macro DayInMonth occurrence=0 day=firstDayOfWeek> ${uiLabelMap.TemporalExpressionOccurrence} ${uiLabelMap.CommonDay} <@DayOfWeekField fieldName="integer1" fieldValue=day/> <#macro DayOfMonthRange fromDay=1 toDay=31> ${uiLabelMap.CommonFrom} <@DayOfMonthField fieldName="integer1" fieldValue=fromDay/> ${uiLabelMap.CommonTo} <@DayOfMonthField fieldName="integer2" fieldValue=toDay/> <#macro HourOfDayRange fromHour=1 toHour=23> ${uiLabelMap.CommonFrom} <@HourOfDayField fieldName="integer1" fieldValue=fromHour/> ${uiLabelMap.CommonTo} <@HourOfDayField fieldName="integer2" fieldValue=toHour/> <#macro DayOfWeekRange fromDay=firstDayOfWeek toDay=lastDayOfWeek> ${uiLabelMap.CommonFrom} <@DayOfWeekField fieldName="integer1" fieldValue=fromDay/> ${uiLabelMap.CommonTo} <@DayOfWeekField fieldName="integer2" fieldValue=toDay/> <#macro Frequency formName="" fromDate="" freqType=-1 freqValue=0> ${uiLabelMap.CommonFrom} <@DateField formName=formName fieldName="date1" fieldValue=fromDate/> ${uiLabelMap.TemporalExpressionFreqType} ${uiLabelMap.TemporalExpressionFreqCount} <#macro MinuteRange fromMinute=1 toMinute=59> ${uiLabelMap.CommonFrom} <@MinuteField fieldName="integer1" fieldValue=fromMinute/> ${uiLabelMap.CommonTo} <@MinuteField fieldName="integer2" fieldValue=toMinute/> <#macro MonthRange fromMonth=0 toMonth=11> ${uiLabelMap.CommonFrom} <@MonthField fieldName="integer1" fieldValue=fromMonth/> ${uiLabelMap.CommonTo} <@MonthField fieldName="integer2" fieldValue=toMonth/> <#macro TimeOfDayRange fromTime="" toTime="" freqType=11 freqValue=1> ${uiLabelMap.CommonFrom} ${uiLabelMap.TemporalExpressionTimeFormat} ${uiLabelMap.CommonTo} ${uiLabelMap.TemporalExpressionTimeFormat} ${uiLabelMap.TemporalExpressionFreqType} ${uiLabelMap.TemporalExpressionFreqCount}