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

<script type="text/javascript">
function refresh_qualifica(id) {
	var id1=$(id).val();
	if (id1 != '') {
		loadStandardSelectOptionsAndFill('cbo_qualifica', 
			'it.cedaf.icare.valutazioni.control.binding.requestbean.valuesetproviders.EquipeQualificaValuesetProvider(idOp)', "idOp="+id1);
	} else {
		clearCombo('cbo_qualifica');
	}
}
</script>

<j:tile slave="equipe" name="shell.slaveToolbar" />
<shell:grid description="operatore,30%; qualifica,20%; scheda,50%" slave="equipe" />

<shell:fieldset title="${j:bundle('LBL_equipeValutazioni_SET')}">
	<table border="0" cellpadding="0" cellspacing="3" width="100%">
		<tr>
			<td valign="top" width="50%">
				<table border="0" cellpadding="0" cellspacing="3">
					<tr>
						<td class="form-label">
							<shell:label prop="operatore" />
						</td>
						<td class="form-values">
							<bui:out slave="equipe" modes="view">
								<j:tile slave="equipe" name="shell.plaintext" prop="operatore" />
							</bui:out>
							<bui:out slave="equipe" modes="create,update">
								<c:if test="${empty operatoreAsText}">
									<j:bind prop="idOperatore">
										<j:select id="cbo_operatore" onchange="refresh_qualifica(this);" class="form-input" emptyOptionDescr=" "/>
										<shell:error />
									</j:bind>
								</c:if>
								<c:if test="${not empty operatoreAsText}">
									<j:bind prop="nominativoOperatore">
										<j:text class="form-normal-text" />
										<shell:error />
									</j:bind>
								</c:if>
							</bui:out>
						</td>
					</tr>
					<tr>
						<td class="form-label">
							<shell:label prop="qualifica" />
						</td>
						<td class="form-values">
							<bui:out slave="equipe" modes="view">
								<j:tile slave="equipe" name="shell.plaintext" prop="qualifica" />
							</bui:out>
							<bui:out slave="equipe" modes="create,update">
								<j:bind prop="idQualifica">
									<j:select id="cbo_qualifica" class="form-input" emptyOptionDescr=" "/>
									<shell:error />
								</j:bind>
							</bui:out>
						</td>
					</tr>
					
					<tr>
						<td class="form-label">
							<shell:label prop="scheda" />
						</td>
						<td class="form-values">
							<bui:out slave="equipe" modes="view">
								<j:tile slave="equipe" name="shell.plaintext" prop="scheda" />
							</bui:out>
							<bui:out slave="equipe" modes="create,update">
								<j:bind prop="idModelloScheda">
									<j:select id="cbo_scheda" class="form-input" emptyOptionDescr=" " hideIfEmpty="true" />
									<shell:error />
								</j:bind>
							</bui:out>
						</td>
					</tr>
					
					<tr>
						<td class="form-label">
							<shell:label prop="note" />
						</td>
						<td class="form-values">
							<bui:out slave="equipe" modes="view">
								<j:tile slave="equipe" name="shell.plaintext" prop="note" />
							</bui:out>
							<bui:out slave="equipe" modes="create,update">
								<j:bind prop="note">
									<j:textarea class="form-normal-textarea" />
									<shell:error />
								</j:bind>
							</bui:out>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</shell:fieldset>