<%@page import="com.ardeo.entities.autoforms.FormField"%>
<%@ include file="/includes.jsp" %>
<tiles:importAttribute /><%--This imports all tiles attributes to page --%>
<%
	FormField field=(FormField)pageContext.getAttribute("field");
%>
<jsp:useBean id="theTimeIsNow" class="java.util.Date" scope="page" />
<c:if test="${field.fieldType eq 101 }">
	<div>
		<c:choose>
			<c:when test="${isPreview}"><c:out value="${webapp.currentUser.name}"/></c:when>
			<c:otherwise>
				<c:out value="${consultationNoteForm.view.note.createdByUser.name}"/>
			</c:otherwise>
		</c:choose>
	</div>

</c:if>
<c:if test="${field.fieldType eq 102 }">
	<div>
		<c:choose>
			<c:when test="${isPreview}"><c:out value="${webapp.currentUser.name}"/></c:when>
			<c:otherwise>
				<c:out value="${consultationNoteForm.view.note.modifiedByUser.name}"/>
			</c:otherwise>
		</c:choose>
	</div>

</c:if>
<c:if test="${field.fieldType eq 103 }">
	<div>
		<c:choose>
			<c:when test="${isPreview}">
				<fmt:formatDate value="${theTimeIsNow}" pattern="dd MMM yyyy HH:mm:ss" />
			</c:when>
			<c:otherwise>
				<fmt:formatDate value="${consultationNoteForm.view.note.creationDate}" pattern="dd MMM yyyy HH:mm:ss" />
			</c:otherwise>
		</c:choose>
	</div>
</c:if>
<c:if test="${field.fieldType eq 104 }">
	<div>
		<c:choose>
			<c:when test="${isPreview}">
				<fmt:formatDate value="${theTimeIsNow}" pattern="dd MMM yyyy HH:mm:ss" />
			</c:when>
			<c:otherwise>
				<fmt:formatDate value="${consultationNoteForm.view.note.modifiedDate}" pattern="dd MMM yyyy HH:mm:ss" />
			</c:otherwise>
		</c:choose>
	</div>

</c:if>