<%@page import="com.ardeo.entities.autoforms.FormField"%>
<%@ include file="/includes.jsp" %>
<%@ taglib prefix="smvc" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<tiles:importAttribute /><%--This imports all tiles atributes to page --%>
<%
	FormField field=(FormField)pageContext.getAttribute("field");
%>
<%-- START DATE EDIT --%>
<spring:bind path='value[${field.name}]'>
<c:choose>
	<c:when test="${disabled or readOnly}">
		<input type="text" name='value[<c:out value="${field.name}"/>]' size="0" id="<%=field.getName()%>" class="form-control" disabled="disabled" placeholder="dd/mm/yyyy" value="<c:out value="${consultationNoteForm.view.note.values[field.name]}"/>" />
	</c:when>
	<c:otherwise>
		<input type="text" name='value[<c:out value="${field.name}"/>]' size="0" id="<%=field.getName()%>" class="form-control" placeholder="dd/mm/yyyy" value="<c:out value="${consultationNoteForm.view.note.values[field.name]}"/>"/>
	</c:otherwise>
</c:choose>
</spring:bind>
&nbsp; 
<c:choose>
	<c:when test="${'true' ne disabled and readOnly}">
		<img src='../images/16x16/date.png' onClick="">
	</c:when>
	<c:otherwise>
		<img title='Click to choose date' style='cursor: pointer;'
			src='../images/16x16/date.png' id="<%=field.getName()%>_DateTrigger" />
	</c:otherwise>
</c:choose>

<c:if test="${('true' ne disabled) and (('referrals' ne consultationNoteForm.view.sourceModule) and ('responses' ne consultationNoteForm.view.sourceModule))}">
<%-- Calendar not yet implemented in eMDTv2
<a href="javascript:addEvent('<c:out value="${field.name}', '<c:out value="${formDef.label} : <c:out value="${field.label}')" title="Add event to calendar">
	<img width="12"  src="../calendar/images/16x16/addEvent.png"/>
</a>
 --%>
</c:if>

<%-- END DATE EDIT --%>