<%@ include file="/project/include.jsp" %>

<shell:fieldset title="Informazioni generali">	
	<table border="0" cellpadding="0" cellspacing="3" width="100%">	
		<tr>
			<td class="form-label">
				<shell:label prop="codice" />
			</td>
			<td class="form-values">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="codice" />
				</bui:out>				
				<bui:out modes="create,update">									
					<j:bind prop="codice">
						<j:text class="form-short-text" />
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="descrizione" />
			</td>
			<td class="form-values">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="descrizione" />
				</bui:out>				
				<bui:out modes="create,update">									
					<j:bind prop="descrizione">
						<j:text class="form-normal-text" />
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="dataInizio" />
			</td>
			<td class="form-values">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="dataInizio" />
				</bui:out>				
				<bui:out modes="create,update">									
					<j:bind prop="dataInizio">
						<j:text class="form-date" id="dataInizioCld" />
						<shell:calendar inputId="dataInizioCld" />
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="dataFine" />
			</td>
			<td class="form-values">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="dataFine" />
				</bui:out>				
				<bui:out modes="create,update">									
					<j:bind prop="dataFine">
						<j:text class="form-date" id="dataFineCld" />
						<shell:calendar inputId="dataFineCld" />
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<c:if test="${empty fromSGTI}">
		<tr>
			<td class="form-label">
				<shell:label prop="ente" />
			</td>
			<td class="form-data">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="ente" />
				</bui:out>
				<bui:out modes="create, update">
					<c:choose>
						<c:when test="${!empty bloccaEnte && bloccaEnte == 'true'}">
							<j:tile name="shell.plaintext" prop="ente" />
							<j:bind prop="ente">
								<j:hidden />
							</j:bind>
						</c:when>
						<c:otherwise>
							<j:bind prop="ente">
								<j:select id="idEnte" class="form-input" emptyOptionDescr="" onChange="getServiziOnChangeEnte('idEnte', 'idServizio');"/> 
								<shell:error />
							</j:bind>
						</c:otherwise>
					</c:choose>		
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="servizio" />
			</td>
			<td class="form-data">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="servizio" />
				</bui:out>
				<bui:out modes="create, update">
					<c:choose>
						<c:when test="${!empty bloccaServizio && bloccaServizio == 'true'}">
							<j:tile name="shell.plaintext" prop="servizio" />
							<j:bind prop="servizio">
								<j:hidden />
							</j:bind>
						</c:when>
						<c:otherwise>
							<j:bind prop="servizio">
								<j:select id="idServizio" class="form-input" emptyOptionDescr="" /> 
								<shell:error />
							</j:bind>
						</c:otherwise>
					</c:choose>						
				</bui:out>
			</td>
		</tr>	
		</c:if>	
		<tr>
			<td class="form-label">
				<shell:label prop="note" />
			</td>
			<td class="form-values">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="note" />
				</bui:out>
				<bui:out modes="create, update">
					<j:bind prop="note">
						<j:textarea class="form-normal-textarea" />
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
	</table>
</shell:fieldset>