com.liferay.dynamic.data.mapping.service.dependencies.ddm.image.ftl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.dynamic.data.mapping.service Show documentation
Show all versions of com.liferay.dynamic.data.mapping.service Show documentation
Liferay Dynamic Data Mapping Service
<#include "../init.ftl">
<#if !(fields?? && fields.get(fieldName)??) && validator.isNull(fieldRawValue)>
<#assign fieldRawValue = predefinedValue />
#if>
<#assign
fieldRawValue = paramUtil.getString(request, "${namespacedFieldName}", fieldRawValue)
alt = ""
imageData = ""
name = languageUtil.get(locale, "drag-file-here")
/>
<#if fieldRawValue?has_content>
<#assign
fileJSONObject = getFileJSONObject(fieldRawValue)
alt = fileJSONObject.getString("alt")
imageData = fileJSONObject.getString("data")
name = fileJSONObject.getString("name")
/>
#if>
<#assign data = data + {
"itemSelectorAuthToken": itemSelectorAuthToken
}>
<@liferay_aui["field-wrapper"]
cssClass="form-builder-field"
data=data
>
<@liferay_aui.input
helpMessage=escape(fieldStructure.tip)
inlineField=true
label=escape(label)
name="${namespacedFieldName}Title"
readonly="readonly"
required=required
type="text"
value=(name?has_content)?string(name, languageUtil.get(locale, "drag-file-here"))
/>
<@liferay_aui.input
name=namespacedFieldName
type="hidden"
value=fieldRawValue
/>
<@liferay_aui.input
label="image-description"
name="${namespacedFieldName}Alt"
required=required
type="text"
value="${alt}"
/>
${fieldStructure.children}
@>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy