<#assign compactMode = field.control.params.compactMode!false> <#macro renderPickerJS field picker="picker"> <@renderPickerJS field "picker" false/> <#macro renderPickerJS field picker="picker" cloud=false> <#if field.control.params.selectedValueContextProperty??> <#if context.properties[field.control.params.selectedValueContextProperty]??> <#local renderPickerJSSelectedValue = context.properties[field.control.params.selectedValueContextProperty]> <#elseif args[field.control.params.selectedValueContextProperty]??> <#local renderPickerJSSelectedValue = args[field.control.params.selectedValueContextProperty]> <#elseif context.properties[field.control.params.selectedValueContextProperty]??> <#local renderPickerJSSelectedValue = context.properties[field.control.params.selectedValueContextProperty]> <#if cloud> var ${picker} = new Alfresco.CloudObjectFinder("${controlId}", "${fieldHtmlId}").setOptions( <#else> var ${picker} = new Alfresco.ABObjectFinder("${controlId}", "${fieldHtmlId}").setOptions( { <#if form.mode == "view" || (field.disabled && !(field.control.params.forceEditable?? && field.control.params.forceEditable == "true"))>disabled: true, field: "${field.name}", compactMode: ${compactMode?string}, <#if field.mandatory??> mandatory: ${field.mandatory?string}, <#elseif field.endpointMandatory??> mandatory: ${field.endpointMandatory?string}, <#if field.control.params.startLocation??> startLocation: "${field.control.params.startLocation}", <#if form.mode == "edit" && args.itemId??>currentItem: "${args.itemId?js_string}", <#if form.mode == "create" && form.destination?? && form.destination?length > 0>currentItem: "${form.destination?js_string}", <#if field.control.params.startLocationParams??> startLocationParams: "${field.control.params.startLocationParams?js_string}", currentValue: "${field.value}", <#if field.control.params.valueType??>valueType: "${field.control.params.valueType}", <#if renderPickerJSSelectedValue??>selectedValue: "${renderPickerJSSelectedValue}", <#if field.control.params.selectActionLabelId??>selectActionLabelId: "${field.control.params.selectActionLabelId}", selectActionLabel: "${field.control.params.selectActionLabel!msg("button.select")}", minSearchTermLength: ${field.control.params.minSearchTermLength!'1'}, maxSearchResults: ${field.control.params.maxSearchResults!'1000'} }).setMessages( ${messages} ); <#macro renderPickerHTML controlId> <#assign pickerId = controlId + "-picker">
${msg("form.control.object-picker.header")}
<#nested>