<#-- 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/> <#macro renderDisplayField type imageLocation idName description title class alert inPlaceEditorUrl="" inPlaceEditorParams=""> <#if type?has_content && type=="image"> <#lt/> <#else> <#if inPlaceEditorUrl?has_content || class?has_content || alert=="true" || title?has_content> id="cc_${idName}" <#if title?has_content>title="${title}" <@renderClass class alert />><#t/> <#if description?has_content> ${description?replace("\n", "
")}<#t/> <#else>  <#t/> <#if inPlaceEditorUrl?has_content || class?has_content || alert=="true">
<#lt/> <#if inPlaceEditorUrl?has_content && idName?has_content> <#lt/> <#macro renderHyperlinkField> <#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask> <#if mask?has_content> <@renderClass className alert /> <#if value?has_content> value="${value}"<#rt/> <#if textSize?has_content> size="${textSize}"<#rt/> <#if maxlength?has_content> maxlength="${maxlength}"<#rt/> <#if disabled?has_content && disabled> disabled="disabled"<#rt/> <#if id?has_content> id="${id}"<#rt/> <#if event?has_content && action?has_content> ${event}="${action}"<#rt/> <#if clientAutocomplete?has_content && clientAutocomplete=="false"> autocomplete="off"<#rt/> /><#t/> <#if ajaxEnabled?has_content && ajaxEnabled> <#assign defaultMinLength = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.defaultMinLength")> <#assign defaultDelay = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.defaultDelay")> <#lt/> <#macro renderTextareaField name className alert cols rows id readonly value visualEditorEnable buttons language=""> <#lt/> <#if visualEditorEnable?has_content> <#rt/> <#if language?has_content && language != "en"> <#rt/> <#macro renderDateTimeField name className alert title value size maxlength id dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName mask="" event="" action="" step="" timeValues=""> <#if dateType!="time" > <#rt/> <#if title?has_content> title="${title}" <#if value?has_content> value="${value}" <#if size?has_content> size="${size}"<#rt/> <#if maxlength?has_content> maxlength="${maxlength}" <#if id?has_content> id="${id}_i18n"/><#rt/> <#-- the style attribute is a little bit messy but when using disply:none the timepicker is shown on a wrong place --> ${event}="${action}" <@renderClass className alert /><#rt/> <#if title?has_content> title="${title}" <#if value?has_content> value="${value}" <#if size?has_content> size="${size}"<#rt/> <#if maxlength?has_content> maxlength="${maxlength}" <#if id?has_content> id="${id}"/><#rt/> <#if dateType!="time" > <#if timeDropdown?has_content && timeDropdown=="time-dropdown"> : <#rt/> <#if isTwelveHour> <#rt/> <#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 otherFieldName?has_content> <#if ajaxEnabled> <#macro renderCheckField items className alert id allChecked currentValue name event action> <#list items as item> id="${id}" <@renderClass className alert /><#rt/> <#if allChecked?has_content && allChecked> checked="checked" <#elseif allChecked?has_content && !allChecked><#elseif currentValue?has_content && currentValue==item.value> checked="checked" name="${name?default("")?html}" value="${item.value?default("")?html}"<#if event?has_content> ${event}="${action}"/><#rt/> ${item.description?default("")} <#macro renderRadioField items className alert currentValue noCurrentSelectedKey name event action> <#list items as item> ><#rt/> <#if currentValue==item.key> checked="checked"<#elseif noCurrentSelectedKey?has_content && noCurrentSelectedKey == item.key> checked="checked" name="${name?default("")?html}" value="${item.key?default("")?html}"<#if event?has_content> ${event}="${action}"/><#rt/> ${item.description} <#macro renderSubmitField buttonType className alert formName title name event action imgSrc confirmation containerId ajaxUrl> <#if buttonType=="text-link"> href="javascript:document.${formName}.submit()" <#if confirmation?has_content>onclick="return confirm('${confirmation?js_string}');"><#if title?has_content>${title} <#elseif buttonType=="image"> <#if name?has_content> name="${name}"<#if title?has_content> alt="${title}"<#if event?has_content> ${event}="${action}" <#if confirmation?has_content>onclick="return confirm('${confirmation?js_string}');"/> <#else> <#if name?exists> name="${name}"<#if title?has_content> value="${title}"<#if event?has_content> ${event}="${action}"<#if containerId?has_content> onclick="<#if confirmation?has_content>if (confirm('${confirmation?js_string}')) ajaxSubmitFormUpdateAreas('${containerId}', '${ajaxUrl}')"<#else><#if confirmation?has_content> onclick="return confirm('${confirmation?js_string}');"/> <#macro renderResetField className alert name title> name="${name}"<#if title?has_content> value="${title}"/> <#macro renderHiddenField name value id event action> value="${value}"<#if id?has_content> id="${id}"<#if event?has_content && action?has_content> ${event}="${action}"/> <#macro renderIgnoredField> <#macro renderFieldTitle style title id fieldHelpText=""> title="${fieldHelpText}"<#if style?has_content> class="${style}"<#if id?has_content> id="${id}"><#t/> ${title}<#t/> <#t/> <#macro renderSingleFormFieldTitle> <#macro renderFormOpen linkUrl formType targetWindow containerId containerStyle autocomplete name viewIndexField viewSizeField viewIndex viewSize useRowSubmit>
enctype="multipart/form-data"<#if targetWindow?has_content> target="${targetWindow}"<#if containerId?has_content> id="${containerId}" class=<#if containerStyle?has_content>"${containerStyle}"<#else>"basic-form" onsubmit="javascript:submitFormDisableSubmits(this)"<#if autocomplete?has_content> autocomplete="${autocomplete}" name="${name}"><#lt/> <#if useRowSubmit?has_content && useRowSubmit> <#if linkUrl?index_of("VIEW_INDEX") <= 0 && linkUrl?index_of(viewIndexField) <= 0> <#if linkUrl?index_of("VIEW_SIZE") <= 0 && linkUrl?index_of(viewSizeField) <= 0> <#macro renderFormClose focusFieldName formName containerId hasRequiredField>
<#lt/> <#if focusFieldName?has_content> <#lt/> <#if containerId?has_content && hasRequiredField?has_content> <#macro renderMultiFormClose> <#lt/> <#macro renderFormatListWrapperOpen formName style columnStyles> <#lt/> <#macro renderFormatListWrapperClose formName>
<#lt/> <#macro renderFormatHeaderRowOpen style> <#macro renderFormatHeaderRowClose> <#macro renderFormatHeaderRowCellOpen style positionSpan> colspan="${positionSpan}"<#if style?has_content>class="${style}"> <#macro renderFormatHeaderRowCellClose> <#macro renderFormatHeaderRowFormCellOpen style> class="${style}"> <#macro renderFormatHeaderRowFormCellClose> <#macro renderFormatHeaderRowFormCellTitleSeparator style isLast> <#if style?has_content> - <#if style?has_content> <#macro renderFormatItemRowOpen formName itemIndex altRowStyles evenRowStyle oddRowStyle> <#if itemIndex%2==0><#if evenRowStyle?has_content>class="${evenRowStyle}<#if altRowStyles?has_content> ${altRowStyles}"<#elseif altRowStyles?has_content>class="${altRowStyles}"<#else><#if oddRowStyle?has_content>class="${oddRowStyle}<#if altRowStyles?has_content> ${altRowStyles}"<#elseif altRowStyles?has_content>class="${altRowStyles}" > <#macro renderFormatItemRowClose formName> <#macro renderFormatItemRowCellOpen fieldName style positionSpan> colspan="${positionSpan}"<#if style?has_content>class="${style}"> <#macro renderFormatItemRowCellClose fieldName> <#macro renderFormatItemRowFormCellOpen style> class="${style}"> <#macro renderFormatItemRowFormCellClose> <#macro renderFormatSingleWrapperOpen formName style> class="${style}"> <#macro renderFormatSingleWrapperClose formName>
<#macro renderFormatFieldRowOpen> <#macro renderFormatFieldRowClose> <#macro renderFormatFieldRowTitleCellOpen style> <#macro renderFormatFieldRowTitleCellClose> <#macro renderFormatFieldRowSpacerCell> <#macro renderFormatFieldRowWidgetCellOpen positionSpan style> colspan="${1+positionSpan*3}"<#if style?has_content> class="${style}"> <#macro renderFormatFieldRowWidgetCellClose> <#-- Initial work to convert table based layout for "single" form to divs. <#macro renderFormatSingleWrapperOpen style>
class="${style}" > <#macro renderFormatSingleWrapperClose>
<#macro renderFormatFieldRowOpen>
<#macro renderFormatFieldRowClose>
<#macro renderFormatFieldRowTitleCellOpen style>
<#macro renderFormatFieldRowTitleCellClose>
<#macro renderFormatFieldRowSpacerCell> <#macro renderFormatFieldRowWidgetCellOpen positionSpan style> colspan="${1+positionSpan*3}"<#if style?has_content> class="${style}"> <#macro renderFormatFieldRowWidgetCellClose> --> <#macro renderFormatEmptySpace>  <#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" value="${defaultOption}"/><#rt/> name="${name}"<#if value?has_content> value="${value}"<#if size?has_content> size="${size}"<#if maxlength?has_content> maxlength="${maxlength}"<#if autocomplete?has_content> autocomplete="off"/><#rt/> <#if titleStyle?has_content><#rt/> <#if hideIgnoreCase> "Y"<#else> ""/><#rt/> <#else> checked="checked" /> ${ignoreCase}<#rt/> <#if titleStyle?has_content> <#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 localizedInputTitle?has_content> title="${localizedInputTitle}"<#if value?has_content> value="${value}"<#if size?has_content> size="${size}"<#if maxlength?has_content> maxlength="${maxlength}"/><#rt/> <#if dateType != "time"> <#rt/> <#if titleStyle?has_content> <#rt/> name="${name}_fld0_op" class="selectBox"><#rt/> <#rt/> <#rt/> <#rt/> <#rt/> <#rt/> <#if titleStyle?has_content> <#rt/> <#rt/> <#if name?has_content> name="${name}_fld1_value"<#if localizedInputTitle?exists> title="${localizedInputTitle?html}"<#if value2?has_content> value="${value2}"<#if size?has_content> size="${size}"<#if maxlength?has_content> maxlength="${maxlength}"/><#rt/> <#if dateType != "time"> <#rt/> <#if titleStyle?has_content> <#rt/> <#rt/> <#if titleStyle?has_content> <#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 value?has_content> value="${value}"<#if size?has_content> size="${size}"<#if maxlength?has_content> maxlength="${maxlength}"<#if autocomplete?has_content> autocomplete="off"/><#rt/> <#if titleStyle?has_content> <#rt/> <#rt/> <#if titleStyle?has_content> <#rt/>
<#rt/> <#if name?has_content> name="${name}_fld1_value"<#if value2?has_content> value="${value2}"<#if size?has_content> size="${size}"<#if maxlength?has_content> maxlength="${maxlength}"<#if autocomplete?has_content> autocomplete="off"/><#rt/> <#if titleStyle?has_content> <#rt/> <#rt/> <#if titleStyle?has_content> <#-- @renderLookupField Description: Renders a text input field as a lookup field. Parameter: name, String, required - The name of the lookup field. Parameter: formName, String, required - The name of the form that contains the lookup field. Parameter: fieldFormName, String, required - Contains the lookup window form name. Parameter: className, String, optional - The CSS class name for the lookup field. Parameter: alert, String, optional - If "true" then the "alert" CSS class will be added to the lookup field. Parameter: value, Object, optional - The value of the lookup field. Parameter: size, String, optional - The size of the lookup field. Parameter: maxlength, String or Integer, optional - The max length of the lookup field. Parameter: id, String, optional - The ID of the lookup field. Parameter: event, String, optional - The lookup field event that invokes "action". If the event parameter is not empty, then the action parameter must be specified as well. Parameter: action, String, optional - The action that is invoked on "event". If action parameter is not empty, then the event parameter must be specified as well. Parameter: readonly, boolean, optional - If true, the lookup field is made read-only. Parameter: autocomplete, String, optional - If not empty, autocomplete is turned off for the lookup field. Parameter: descriptionFieldName, String, optional - If not empty and the presentation parameter contains "window", specifies an alternate input field for updating. Parameter: targetParameterIter, List, optional - Contains a list of form field names whose values will be passed to the lookup window. Parameter: imgSrc, Not used. Parameter: ajaxUrl, String, optional - Contains the Ajax URL, used only when the ajaxEnabled parameter contains true. Parameter: ajaxEnabled, boolean, optional - If true, invokes the Ajax auto-completer. Parameter: presentation, String, optional - Contains the lookup window type, either "layer" or "window". Parameter: width, String or Integer, optional - The width of the lookup field. Parameter: height, String or Integer, optional - The height of the lookup field. Parameter: position, String, optional - The position style of the lookup field. Parameter: fadeBackground, ? Parameter: clearText, String, optional - If the readonly parameter is true, clearText contains the text to be displayed in the field, default is CommonClear label. Parameter: showDescription, String, optional - If the showDescription parameter is true, a special span with css class "tooltip" will be created at right of the lookup button and a description will fill in (see setLookDescription in selectall.js). For now not when the lookup is read only. Parameter: initiallyCollapsed, Not used. Parameter: lastViewName, String, optional - If the ajaxEnabled parameter is true, the contents of lastViewName will be appended to the Ajax URL. --> <#macro renderLookupField name formName fieldFormName className="" alert="false" value="" size="" maxlength="" id="" event="" action="" readonly=false autocomplete="" descriptionFieldName="" targetParameterIter="" imgSrc="" ajaxUrl="" ajaxEnabled=javaScriptEnabled presentation="layer" width="" height="" position="" fadeBackground="true" clearText="" showDescription="" initiallyCollapsed="" lastViewName="main" > <#if Static["org.ofbiz.widget.ModelWidget"].widgetBoundaryCommentsEnabled(context)> <#if (!ajaxUrl?has_content) && ajaxEnabled> <#local ajaxUrl = requestAttributes._REQUEST_HANDLER_.makeLink(request, response, fieldFormName)/> <#local ajaxUrl = id + "," + ajaxUrl + ",ajaxLookup=Y" /> <#if (!showDescription?has_content)> <#local showDescriptionProp = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.lookup.showDescription", "N")> <#if "Y" == showDescriptionProp> <#local showDescription = "true" /> <#else> <#local showDescription = "false" /> <#if ajaxEnabled?has_content && ajaxEnabled> <#if size?has_content && size=="0"> name="${name}"/><#else><#if name?has_content> name="${name}"<#if value?has_content> value="${value}"<#if size?has_content> size="${size}"<#if maxlength?has_content> maxlength="${maxlength}"<#if id?has_content> id="${id}"<#rt/><#if readonly?has_content && readonly> readonly="readonly"<#rt/><#if event?has_content && action?has_content> ${event}="${action}"<#rt/><#if autocomplete?has_content> autocomplete="off"/><#rt/> <#if presentation?has_content && descriptionFieldName?has_content && presentation == "window"> <#rt> <#elseif presentation?has_content && presentation == "window"> <#rt> <#else> <#if ajaxEnabled?has_content && ajaxEnabled> <#assign defaultMinLength = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.defaultMinLength")> <#assign defaultDelay = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.autocompleter.defaultDelay")> <#local ajaxUrl = ajaxUrl + "&_LAST_VIEW_NAME_=" + lastViewName /> <#if !ajaxUrl?contains("searchValueFieldName=")> <#if descriptionFieldName?has_content && showDescription == "true"> <#local ajaxUrl = ajaxUrl + "&searchValueFieldName=" + descriptionFieldName /> <#else> <#local ajaxUrl = ajaxUrl + "&searchValueFieldName=" + name /> <#if readonly?has_content && readonly> <#if clearText?has_content>${clearText}<#else>${uiLabelMap.CommonClear} <#if ajaxEnabled?has_content && ajaxEnabled && (presentation?has_content && presentation == "window")> <#if ajaxUrl?index_of("_LAST_VIEW_NAME_") < 0> <#local ajaxUrl = ajaxUrl + "&_LAST_VIEW_NAME_=" + lastViewName /> <#t/> <#macro renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl ajaxSelectSizeUrl selectSizeUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel paginateViewSizeLabel> <#if listSize gt viewSize>
 
  • ${paginateFirstLabel}<#else>-disabled">${paginateFirstLabel}
  • ${paginatePreviousLabel}<#else>-disabled">${paginatePreviousLabel}
  • <#if listSize gt 0 && javaScriptEnabled>
  • ${paginateNextLabel}<#else>-disabled">${paginateNextLabel}
  • ${paginateLastLabel}<#else>-disabled">${paginateLastLabel}
  • <#if javaScriptEnabled>
<#macro renderFileField className alert name value size maxlength autocomplete><#if name?has_content> name="${name}"<#if value?has_content> value="${value}"<#if size?has_content> size="${size}"<#if maxlength?has_content> maxlength="${maxlength}"<#if autocomplete?has_content> autocomplete="off"/><#rt/> <#macro renderPasswordField className alert name value size maxlength id autocomplete><#if name?has_content> name="${name}"<#if value?has_content> value="${value}"<#if size?has_content> size="${size}"<#if maxlength?has_content> maxlength="${maxlength}"<#if id?has_content> id="${id}"<#if autocomplete?has_content> autocomplete="off"/> <#macro renderImageField value description alternate style event action> src="${value}"<#if description?has_content> title="${description}" alt="<#if alternate?has_content>${alternate}"<#if style?has_content> class="${style}"<#if event?has_content> ${event?html}="${action}" /> <#macro renderBanner style leftStyle rightStyle leftText text rightText> <#rt/> <#if leftText?has_content><#rt/> <#if text?has_content><#rt/> <#if rightText?has_content><#rt/>
<#if leftStyle?has_content>
${leftText}<#if leftStyle?has_content>
<#if style?has_content>
${text}<#if style?has_content>
<#if rightStyle?has_content>
${rightText}<#if rightStyle?has_content>
<#macro renderContainerField id className>
<#macro renderFieldGroupOpen style id title collapsed collapsibleAreaId collapsible expandToolTip collapseToolTip> <#if style?has_content || id?has_content || title?has_content>
id="${id}">
<#if collapsible> <#else><#if title?has_content>${title}<#rt/>
style="display: none;"> <#macro renderFieldGroupClose style id title><#if style?has_content || id?has_content || title?has_content>
<#macro renderHyperlinkTitle name title showSelectAll="N"><#if title?has_content>${title}
<#if showSelectAll="Y"> <#macro renderSortField style title linkUrl ajaxEnabled> class="${style}" href="<#if ajaxEnabled?has_content && ajaxEnabled>javascript:ajaxUpdateAreas('${linkUrl}')<#else>${linkUrl}">${title} <#macro formatBoundaryComment boundaryType widgetType widgetName> <#macro renderTooltip tooltip tooltipStyle><#if tooltip?has_content>${tooltip}<#rt/> <#macro renderClass className="" alert=""> <#if className?has_content || (alert?has_content && alert=="true")> class="${className}<#if alert?has_content && alert=="true"> alert" <#macro renderAsterisks requiredField requiredStyle> <#if requiredField=="true"><#if !requiredStyle?has_content>* <#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow>
target="${targetWindow}" onsubmit="javascript:submitFormDisableSubmits(this)" name="${name}"><#list parameters as parameter>
<#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc description confirmation>class="${linkStyle}" href="javascript:document.${hiddenFormName}.submit()"<#if action?has_content && event?has_content> ${event}="${action}"<#if confirmation?has_content> onclick="return confirm('${confirmation?js_string}')"><#if imgSrc?has_content>${description} <#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title alternate linkUrl targetWindow description confirmation>class="${linkStyle}" href="${linkUrl}"<#if targetWindow?has_content> target="${targetWindow}"<#if action?has_content && event?has_content> ${event}="${action}"<#if confirmation?has_content> onclick="return confirm('${confirmation?js_string}')"<#if imgSrc?length == 0 && title?has_content> title="${title}"><#if imgSrc?has_content>${alternate}${description}