#--
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.
-->
<#macro renderField text>
<#if text?exists>
${text}<#lt/>
#if>
#macro>
<#macro renderDisplayField idName description class alert inPlaceEditorId="" inPlaceEditorUrl="" inPlaceEditorParams="">
<#if class?has_content || alert=="true">
id="${idName}"#if> <@renderClass class alert />><#t/>
#if>
<#if description?has_content>
${description?replace("\n", "
")}<#t/>
<#else>
<#t/>
#if>
<#if class?has_content || alert=="true">
<#lt/>
#if>
<#if inPlaceEditorId?has_content>
<#lt/>
#if>
#macro>
<#macro renderHyperlinkField>#macro>
<#macro renderTextField name className alert value textSize maxlength id event action clientAutocomplete ajaxUrl ajaxEnabled>
<@renderClass className alert />
<#if value?has_content> value="${value}"#if><#rt/>
<#if textSize?has_content> size="${textSize}"#if><#rt/>
<#if maxlength?has_content> maxlength="${maxlength}"#if><#rt/>
<#if id?has_content> id="${id}"#if><#rt/>
<#if event?has_content && action?has_content> ${event}="${action}"#if><#rt/>
<#if clientAutocomplete?has_content && clientAutocomplete=="false"> autocomplete="off"#if><#rt/>
/><#t/>
<#if ajaxEnabled?has_content && ajaxEnabled>
<#lt/>
#if>
#macro>
<#macro renderTextareaField name className alert cols rows id readonly value visualEdtiorEnalble buttons>
<@renderClass className alert />
<#if cols?has_content> cols="${cols}"#if><#rt/>
<#if rows?has_content> rows="${rows}"#if><#rt/>
<#if id?has_content> id="${id}"#if><#rt/>
<#if readonly?has_content> ${readonly}#if><#rt/>
<#if maxlength?has_content> maxlength="${maxlength}"#if><#rt/>
><#t/>
<#if value?has_content>${value}#if><#t/>
<#rt/>
<#if visualEdtiorEnalble?has_content>
<#rt/>
#if>
#macro>
<#macro renderDateTimeField name className alert title value size maxlength id dateType shortDateInput timeDropdownParamName defaultDateTimeString calGif localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName>
<#rt/>
<#if title?has_content> title="${title}"#if><#if value?has_content> value="${value}"#if><#if size?has_content> size="${size}"#if><#rt/>
<#if maxlength?has_content> maxlength="${maxlength}"#if><#if id?has_content> id="${id}"#if>/><#rt/>
<#if dateType!="time" >
<#if shortDateInput?exists && shortDateInput>
#if>
${formName}.<#if timeDropdownParamName?has_content>${timeDropdownParamName}#if><#if defaultDateTimeString?has_content>,'${defaultDateTimeString}'#if>);"><#rt/>
<#if calGif?has_content><#rt/>#if>
<#rt/>
#if>
<#if timeDropdown?has_content && timeDropdown=="time-dropdown">
:<#rt/>
<#if isTwelveHour>
<#rt/>
#if>
#if>
#macro>
<#macro renderDropDownField name className alert id multiple formName otherFieldName event action size firstInList currentValue explicitDescription allowEmpty options fieldName otherFieldName otherValue otherFieldSize dDFCurrent ajaxEnabled noCurrentSelectedKey ajaxOptions frequency minChars choices autoSelect partialSearch partialChars ignoreCase fullSearch>
<#if ajaxEnabled>
<#if otherFieldName?has_content>
#if>
#if>
#macro>
<#macro renderCheckField items className alert allChecked currentValue name event action>
<#list items as item>
<#rt/>
<#if allChecked?has_content && allChecked> checked="checked" <#elseif allChecked?has_content && !allChecked><#elseif currentValue?has_content && currentValue==item.value> checked="checked"#if> name="${name?default("")?html}" value="${item.value?default("")?html}"<#if event?has_content> ${event}="${action}"#if>/><#rt/>
${item.description?default("")}
#list>
#macro>
<#macro renderRadioField items className alert currentValue noCurrentSelectedKey name event action>
<#list items as item>
><#rt/>
<#if rp.currentValue==item.key> checked="checked"#if><#elseif noCurrentSelectedKey?has_content && noCurrentSelectedKey == item.key> checked="checked"#if> name="${name?default("")?html}" value="${item.key?default("")?html}"<#if event?has_content> ${event}="${action}"#if>/><#rt/>
${item.description}
#list>
#macro>
<#macro renderSubmitField buttonType className alert formName title name event action imgSrc containerId ajaxUrl>
<#if buttonType=="text-link">
href="javascript:document.${formName}.submit()"><#if title?has_content>${title}#if>
<#elseif buttonType=="image">
<#if name?has_content> name="${name}"#if><#if title?has_content> alt="${title}"#if><#if event?has_content> ${event}="${action}"#if> />
<#else>
<#if name?exists> name="${name}"#if><#if title?has_content> value="${title}"#if><#if event?has_content> ${event}="${action}"#if><#if containerId?has_content> onclick="ajaxSubmitFormUpdateAreas('${containerId}', '${ajaxUrl}')"#if>/>#if>
#macro>
<#macro renderResetField className alert name title>
name="${name}"<#if title?has_content> value="${title}"#if>/>
#macro>
<#macro renderHiddenField name value>
value="${value}"#if>/>
#macro>
<#macro renderIgnoredField>#macro>
<#macro renderFieldTitle style title>
<#if style?has_content>
<#t/>
#if>
${title}<#t/>
<#if style?has_content>
<#lt/>
#if>
#macro>
<#macro renderSingleFormFieldTitle>#macro>
<#macro renderFormOpen linkUrl formType targetWindow containerId containerStyle autocomplete name useRowSubmit>
<#lt/>
<#if focusFieldName?has_content>
<#lt/>
#if>
#macro>
<#macro renderMultiFormClose>#macro>
<#macro renderFormatListWrapperOpen formName style columnStyles>
<#lt/>
#macro>
<#macro renderFormatListWrapperClose formName>
<#lt/>
#macro>
<#macro renderFormatHeaderRowOpen style>
#macro>
<#macro renderFormatHeaderRowCellOpen style positionSpan>
colspan="${positionSpan}"#if><#if style?has_content>class="${style}"#if>>
#macro>
<#macro renderFormatHeaderRowCellClose>
|
#macro>
<#macro renderFormatHeaderRowFormCellOpen style>
class="${style}"#if>>
#macro>
<#macro renderFormatHeaderRowFormCellClose>
|
#macro>
<#macro renderFormatHeaderRowFormCellTitleSeparator style isLast>
<#if style?has_content>#if> - <#if style?has_content>#if>
#macro>
<#macro renderFormatItemRowOpen formName itemIndex altRowStyles evenRowStyle oddRowStyle>
<#if itemIndex%2==0><#if evenRowStyle?has_content>class="${evenRowStyle}<#if altRowStyles?has_content> ${altRowStyles}#if>"<#elseif altRowStyles?has_content>class="${altRowStyles}"#if><#else><#if oddRowStyle?has_content>class="${oddRowStyle}<#if altRowStyles?has_content> ${altRowStyles}#if>"<#elseif altRowStyles?has_content>class="${altRowStyles}"#if>#if>#if> >
#macro>
<#macro renderFormatItemRowClose formName>
#macro>
<#macro renderFormatItemRowCellOpen fieldName style positionSpan>
colspan="${positionSpan}"#if><#if style?has_content>class="${style}"#if>>
#macro>
<#macro renderFormatItemRowCellClose fieldName>
|
#macro>
<#macro renderFormatItemRowFormCellOpen style>
class="${style}"#if>>
#macro>
<#macro renderFormatItemRowFormCellClose>
|
#macro>
<#macro renderFormatSingleWrapperOpen formName style>
class="${style}"#if>>
#macro>
<#macro renderFormatSingleWrapperClose formName>
#macro>
<#macro renderFormatFieldRowOpen>
#macro>
<#macro renderFormatFieldRowClose>
#macro>
<#macro renderFormatFieldRowTitleCellOpen style>
#macro>
<#macro renderFormatFieldRowTitleCellClose>
|
#macro>
<#macro renderFormatFieldRowSpacerCell>#macro>
<#macro renderFormatFieldRowWidgetCellOpen positionSpan style>
colspan="${1+positionSpan*3}"#if><#if style?has_content> class="${style}"#if>>
#macro>
<#macro renderFormatFieldRowWidgetCellClose>
|
#macro>
<#--
Initial work to convert table based layout for "single" form to divs.
<#macro renderFormatSingleWrapperOpen style> class="${style}"#if> >#macro>
<#macro renderFormatSingleWrapperClose>
#macro>
<#macro renderFormatFieldRowOpen> #macro>
<#macro renderFormatFieldRowClose>
#macro>
<#macro renderFormatFieldRowTitleCellOpen style> #macro>
<#macro renderFormatFieldRowTitleCellClose>
#macro>
<#macro renderFormatFieldRowSpacerCell>#macro>
<#macro renderFormatFieldRowWidgetCellOpen positionSpan style> colspan="${1+positionSpan*3}"#if><#if style?has_content> class="${style}"#if>>#macro>
<#macro renderFormatFieldRowWidgetCellClose>
#macro>
-->
<#macro renderFormatEmptySpace> #macro>
<#macro renderTextFindField name value defaultOption opEquals opBeginsWith opContains opIsEmpty opNotEqual className alert size maxlength autocomplete titleStyle hideIgnoreCase ignCase ignoreCase>
<#if opEquals?has_content>
<#else>
"${name}_op"#if> value="${defaultOption}"/><#rt/>
#if>
name="${name}"<#if value?has_content> value="${value}"#if><#if size?has_content> size="${size}"#if><#if maxlength?has_content> maxlength="${maxlength}"#if><#if autocomplete?has_content> autocomplete="off"#if>/><#rt/>
<#if titleStyle?has_content><#rt/>#if>
<#if hideIgnoreCase>
"Y"<#else> ""#if>/><#rt/>
<#else>
checked="checked"#if> /> ${ignoreCase}<#rt/>
#if><#if titleStyle?has_content>#if>
#macro>
<#macro renderDateFindField className alert name localizedInputTitle value size maxlength dateType formName defaultDateTimeString imgSrc localizedIconTitle titleStyle defaultOptionFrom defaultOptionThru opEquals opSameDay opGreaterThanFromDayStart opGreaterThan opGreaterThan opLessThan opUpToDay opUpThruDay opIsEmpty>
<#if name?has_content> name="${name?html}_fld0_value"#if><#if localizedInputTitle?has_content> title="${localizedInputTitle}"#if><#if value?has_content> value="${value}"#if><#if size?has_content> size="${size}"#if><#if maxlength?has_content> maxlength="${maxlength}"#if>/><#rt/>
<#if dateType != "time">
<#if dateType == "date">
#if>
<#if formName?has_content>${formName}.#if><#if name?has_content>${name}_fld0_value,#if>'<#if defaultDateTimeString?has_content>${defaultDateTimeString}#if>');"><#rt/>
<#rt/>
#if>
<#if titleStyle?has_content>
<#rt/>
#if>
<#rt/>
<#if titleStyle?has_content>
<#rt/>
#if>
<#rt/>
<#if name?has_content> name="${name}_fld1_value"#if><#if localizedInputTitle?exists> title="${localizedInputTitle?html}"#if><#if value2?has_content> value="${value2}"#if><#if size?has_content> size="${size}"#if><#if maxlength?has_content> maxlength="${maxlength}"#if>/><#rt/>
<#if dateType != "time">
<#if dateType == "date">
#if>
<#if formName?has_content>${formName}.#if><#if name?has_content>${name}_fld1_value,'#if><#if defaultDateTimeString?has_content>${defaultDateTimeString}#if>');"><#rt/>
<#rt/>
#if>
<#if titleStyle?has_content>
<#rt/>
#if>
<#rt/>
<#if titleStyle?has_content>
#if>
#macro>
<#macro renderRangeFindField className alert name value size maxlength autocomplete titleStyle defaultOptionFrom opEquals opGreaterThan opGreaterThanEquals opLessThan opLessThanEquals value2 defaultOptionThru>
<#if name?has_content>name="${name}_fld0_value"#if><#if value?has_content> value="${value}"#if><#if size?has_content> size="${size}"#if><#if maxlength?has_content> maxlength="${maxlength}"#if><#if autocomplete?has_content> autocomplete="off"#if>/><#rt/>
<#if titleStyle?has_content>
<#rt/>
#if>
<#rt/>
<#if titleStyle?has_content>
<#rt/>
#if>
<#rt/>
<#if name?has_content> name="${name}_fld1_value"#if><#if value2?has_content> value="${value2}"#if><#if size?has_content> size="${size}"#if><#if maxlength?has_content> maxlength="${maxlength}"#if><#if autocomplete?has_content> autocomplete="off"#if>/><#rt/>
<#if titleStyle?has_content>
<#rt/>
#if>
<#rt/>
<#if titleStyle?has_content>
#if>
#macro>
<#macro renderLookupField className alert name value size maxlength autocomplete descriptionFieldName formName lookupFieldFormName targetParameterIter imgSrc>
<#if name?has_content> name="${name}"#if><#if value?has_content> value="${value}"#if><#if size?has_content> size="${size}"#if><#if maxlength?has_content> maxlength="${maxlength}"#if><#if autocomplete?has_content> autocomplete="off"#if>/><#rt/>
<#if descriptionFieldName?has_content>
#if>'${lookupFieldFormName}'<#rt>
<#if targetParameterIter?exists>
<#list targetParameterIter as item>
,document.${formName}.${item}.value<#rt>
#list>
#if>
);"><#rt>
<#rt>
#macro>
<#macro renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel>
- ${paginateFirstLabel}<#else>-disabled">${paginateFirstLabel}#if>
- ${paginatePreviousLabel}<#else>-disabled">${paginatePreviousLabel}#if>
<#if listSize gt 0 && javaScriptEnabled>- ${pageLabel}
- ${commonDisplaying}
#if>
- ${paginateNextLabel}<#else>-disabled">${paginateNextLabel}#if>
- ${paginateLastLabel}<#else>-disabled">${paginateLastLabel}#if>
#macro>
<#macro renderFileField className alert name value size maxlength autocomplete><#if name?has_content> name="${name}"#if><#if value?has_content> value="${value}"#if><#if size?has_content> size="${size}"#if><#if maxlength?has_content> maxlength="${maxlength}"#if><#if autocomplete?has_content> autocomplete="off"#if>/><#rt/>#macro>
<#macro renderPasswordField className alert name value size maxlength id autocomplete><#if name?has_content> name="${name}"#if><#if value?has_content> value="${value}"#if><#if size?has_content> size="${size}"#if><#if maxlength?has_content> maxlength="${maxlength}"#if><#if id?has_content> id="${id}"#if><#if autocomplete?has_content> autocomplete="off"#if>/>#macro>
<#macro renderImageField value border width height event action> src="${value}"#if><#if border?has_content> border="${border}"#if><#if width?has_content> width="${width}"#if><#if height?has_content> height="${height}"#if><#if event?has_content> ${rp.event?html}="${action}" #if>/>#macro>
<#macro renderBanner style leftStyle rightStyle leftText text rightText>
<#rt/>
<#if leftText?has_content><#if leftStyle?has_content> #if>${leftText}<#if leftStyle?has_content> #if> | <#rt/>#if>
<#if text?has_content><#if style?has_content> #if>${text}<#if style?has_content> #if> | <#rt/>#if>
<#if rightText?has_content><#if rightStyle?has_content> #if>${rightText}<#if rightStyle?has_content> #if> | <#rt/>#if>
#macro>
<#macro renderFieldGroupOpen style id title collapsed collapsibleAreaId collapsible expandToolTip collapseToolTip>
<#if style?has_content || id?has_content || title?has_content>
id="${id}"#if>>
<#rt/>
<#if collapsible>#if> | <#rt/>
<#if title?has_content> ${title} #if> |
style="display: none;"#if>>
#if>
#macro>
<#macro renderFieldGroupClose style id title><#if style?has_content || id?has_content || title?has_content>
#if>#macro>
<#macro renderHyperlinkTitle name title showSelectAll="N"><#if title?has_content>${title}
#if><#if showSelectAll="Y">#if>#macro>
<#macro renderSortField style title linkUrl ajaxEnabled> class="${style}"#if> href="<#if ajaxEnabled?has_content && ajaxEnabled>javascript:ajaxUpdateAreas('${linkUrl}')<#else>${linkUrl}#if>">${title}#macro>
<#macro formatBoundaryComment boundaryType widgetType widgetName>#macro>
<#macro renderTooltip tooltip tooltipStyle><#if tooltip?has_content>${tooltip}<#rt/>#if>#macro>
<#macro renderClass className="" alert="">
<#if className?has_content> class="${className}<#if alert?has_content> ${alert}#if>" #if>
#macro>
<#macro renderAsterisks requiredField requiredStyle>
<#if requiredField=="true"><#if requiredStyle?has_content>*#if>#if>
#macro>
<#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow>#macro>
<#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc description>class="${linkStyle}"#if> href="javascript:document.${hiddenFormName}.submit()"<#if action?has_content && event?has_content> ${event}="${action}"#if>><#if imgSrc?has_content>#if>${description}#macro>
<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc linkUrl targetWindow description>class="${linkStyle}"#if> href="${linkUrl}"<#if targetWindow?has_content> target="${targetWindow}"#if><#if action?has_content && event?has_content> ${event}="${action}"#if>><#if imgSrc?has_content>#if>${description}#macro>