All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.liferay.dynamic.data.mapping.service.dependencies.ddm.image.ftl Maven / Gradle / Ivy

There is a newer version: 8.1.0
Show newest version
<#include "../init.ftl">

<#if !(fields?? && fields.get(fieldName)??) && validator.isNull(fieldRawValue)>
	<#assign fieldRawValue = predefinedValue />


<#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")
	/>


<#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.button cssClass="select-button" id="${namespacedFieldName}SelectButton" value="select" /> <@liferay_aui.button cssClass="clear-button ${(imageData?has_content)?string('', 'hide')}" id="${namespacedFieldName}ClearButton" value="clear" /> <@liferay_aui.button cssClass="preview-button ${(imageData?has_content)?string('', 'hide')}" id="${namespacedFieldName}PreviewButton" value="preview" />
<@liferay_aui.input label="image-description" name="${namespacedFieldName}Alt" required=required type="text" value="${alt}" />
${fieldStructure.children}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy