<%
	String uploadId = uicomponent.getUploadId();
	boolean isAutoUpload = uicomponent.isAutoUpload();
	String postUploadActionLink = uicomponent.getPostUploadActionLink();
	def rcontext = _ctx.getRequestContext();
	rcontext.getJavascriptManager().importJavascript('eXo.wiki.UIUpload', '/wiki/javascript/');
	rcontext.getJavascriptManager().addJavascript("eXo.wiki.UIUpload.initUploadEntry('"+uploadId+"',"+isAutoUpload+");");
%>
<div class="UIFormUploadInput" id="$uploadId">
	<div class="LimitMessage"><%= _ctx.appRes("UIFormUploadInput.msg.attachment-limit"); %></div>
	<input type="hidden" id="input$uploadId" title="<%=uicomponent.getName();%>" name="<%=uicomponent.getName();%>" value="false"/>
	<div id="<%=uploadId;%>UploadIframe" class="UploadIframe" title="<%=_ctx.appRes("UIFormUploadInput.label.UploadLink");%>">
		<iframe height="38px" width="80%" allowTransparency="true" scrolling="no" frameborder="0" framespacing="0" id="<%=uploadId;%>uploadFrame"></iframe>
	</div>
	<div id="<%=uploadId;%>ProgressIframe" class="ProgressIframe" style="display: none;"></div>			
	<div class="ProgressBarFrame" style="display: none; margin-top:10px;">
		<div class="ProgressBar">
			<div class="ProgressBarLeft">
				<div class="ProgressBarMiddle">
					<div class="BlueProgressBar">
						<div class="ProgressBarLabel">0%</div>
					</div>
				</div>
			</div>
		</div>
		<div class="DeleteFileFrame">
			<div class="DeleteFileLable" onclick="eXo.wiki.UIUpload.abortUpload($uploadId);"><%=_ctx.appRes("UIFormUploadInput.label.Cancel")%></div>
		</div>
	</div>
	<div class="SelectFileFrame" style="display: none;">
		<div class="FileName">
			<div class="FileNameLabel"><span></span></div>
		</div>
		<div class="RemoveFile" title="Remove Uploaded" onclick="eXo.wiki.UIUpload.deleteUpload($uploadId);"></div>
	</div>
	<div class="PostUploadAction" style="display: none;" onclick="$postUploadActionLink">
	</div>
</div>