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

<script type="text/javascript">
function showHideFieldNuovaPSA() {
	var divNuovaPSA = document.getElementById('idTrNuovaPSA');
	if (divNuovaPSA != null) {
		var idTipoIntervento = null;
		var tipoIntervento = document.getElementById('idTipoIntervento');
		if (tipoIntervento == null) {
			idTipoIntervento = cpGetMasterColumnValueOfCurrentRow('idTipoIntervento');
		} else {
			idTipoIntervento = tipoIntervento.options[tipoIntervento.selectedIndex].value;
		}
		if (idTipoIntervento && idTipoIntervento != '') {
			var nuovaPSAEnabled = jsLoadString('it.cedaf.icare.interventi.control.action.CheckGestionePSAAbilitataExecutor', '&idTipoIntervento=' + idTipoIntervento + '&nuovaPSA=true');
			if (nuovaPSAEnabled == 'true') {
				divNuovaPSA.style.display = '';
			} else {
				divNuovaPSA.style.display = 'none';
			}
		} else {
			divNuovaPSA.style.display = 'none';
		}
	}
}
</script>

<shell:fieldset title="PSA per INPS">
<table border="0" cellspacing="3" cellpadding="0" >
	<icare:workflowProperty prop="psa" >
	<tr>
		<td class="form-label">
			<shell:label prop="escludiBdpsa" />
		</td>
		<td class="form-values">
			<bui:out slave="${_slave}" modes="view">
				<j:tile slave="${_slave}" name="shell.plaintext" prop="escludiBdpsa" />
			</bui:out>
			<bui:out slave="${_slave}" modes="create,update">
				<j:bind prop="escludiBdpsa">
					<j:checkbox id="escludiBdpsa" displayValue="si" />
					<shell:error />
				</j:bind>	
			</bui:out>
		</td>
	</tr>
	</icare:workflowProperty>
	<icare:workflowProperty prop="psa" >
	<tr>
		<td class="form-label">
			<shell:label prop="noProvaMezzi" />
		</td>
		<td class="form-values">
			<bui:out slave="${_slave}" modes="view">
				<j:tile slave="${_slave}" name="shell.plaintext" prop="noProvaMezzi" />
			</bui:out>
			<bui:out slave="${_slave}" modes="create,update">
				<j:bind prop="noProvaMezzi">
					<j:checkbox id="noProvaMezzi" displayValue="si" />
					<shell:error />
				</j:bind>	
			</bui:out>
		</td>
	</tr>
	</icare:workflowProperty>
	<c:if test="${(macrotipologiaIntervento eq '01') or (macrotipologiaIntervento eq '06')}">
		<icare:workflowProperty prop="psa" >
		<tr>
			<td class="form-label">
				<shell:label prop="accettazioneTarUtISEEMaxBDPSA" />
			</td>
			<td class="form-values">
				<bui:out slave="${_slave}" modes="view">
					<j:tile slave="${_slave}" name="shell.plaintext" prop="accettazioneTarUtISEEMaxBDPSA" />
				</bui:out>
				<bui:out slave="${_slave}" modes="create, update">
					<j:bind prop="accettazioneTarUtISEEMaxBDPSA">
						<j:radio displayValue="si"/>${j:bundle('LBL_si')}
						<j:radio displayValue="no"/>${j:bundle('LBL_no')}
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
 		</tr>
 		</icare:workflowProperty>
 	</c:if>
 	<icare:workflowProperty prop="psa" >
	<tr id="idTrNuovaPSA" style="display:none">
		<td class="form-label">
			<shell:label prop="nuovaPSA" />
		</td>
		<td class="form-values">
			<bui:out modes="view">
				<j:tile name="shell.plaintext" prop="nuovaPSA" />
			</bui:out>
			<bui:out modes="create, update">
				<j:bind prop="nuovaPSA">
					<j:select id="idnuovaPSA" class="form-input" emptyOptionDescr="" />
					<shell:error />
				</j:bind>
			</bui:out>
		</td>
	</tr> 	
	</icare:workflowProperty>
</table>
</shell:fieldset>