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

<%@page import="it.cedaf.juice.mvc.commons.WebLib"%>

<script type="text/javascript">
	function viewDashboard() {
		var prefix="wizard";
		var id = document.getElementById('voceBudget').value + '|' + getComboValue('annoDa') + '|' + getComboValue('annoA') + '|';
		
		var radioPoliYes = document.getElementById('visualizzaPoliId_0');
		
		var poli = false;
		
		if (radioPoliYes) {  
			poli = radioPoliYes.checked;
		}
		id += poli;
		
		parent.hideModal('wizardDashboard');
		parent.dashboardVociBudget(prefix,id);
	} 
	
	function getComboValue(comboId) {
		var combo = document.getElementById(comboId);
		if (combo) {
			var selectedIndex = combo.selectedIndex;
			if (selectedIndex != -1) { 
				return combo.options[selectedIndex].value; 
			}
		}
		
		return '';	
	}
	
</script>

<br />

<%--1467155   --%> 



<j:form id="formParams" name="formParams" method="POST" 
	beanClassName="it.cedaf.icare.liquidazioni.control.binding.requestbean.WizardDashboardRequestBean" 
	clientValidatorProvider="it.cedaf.juice.mvc.modules.shell.view.helper.JavascriptClientValidatorProvider">

<table border="0" cellspacing="3" cellpadding="0" >
	<tr>
		<td class="form-label">
			<span>Periodi di riferimento <span class="form-label-required">&nbsp;*</span></span>
		</td>
		<td class="form-values">
			da: 
			<j:bind prop="annoDa">
				<j:select id="annoDa" class="form-input" emptyOptionDescr=""  />		
				<shell:error />
			</j:bind>
			
			a:
			<j:bind prop="annoA">
				<j:select id="annoA" class="form-input" emptyOptionDescr=""  />		
				<shell:error />
			</j:bind>
		</td>
	</tr>
	<c:if test="${!empty gestionePoli && gestionePoli == 'true'}">
		<tr>
			<td class="form-label">
				Visualizza dettagli per polo
			</td>
			<td class="form-values">
				<j:bind prop="visualizzaPoli">
					<j:radio id="visualizzaPoliId_0" displayValue="si" />${j:bundle('LBL_si')}
					<j:radio id="visualizzaPoliId_1" displayValue="no" />${j:bundle('LBL_no')}
					<shell:error />
				</j:bind>
			</td>
		</tr>		
	</c:if>	
	<tr>
		<td>
			&nbsp;
		</td>
		<td class="form-values">
			<br>&nbsp;&nbsp;<button class="generic-button ui-state-default ui-corner-all" id="idButton" onclick="javascript:viewDashboard();"><img src="${j:getResourceUrlOfModule('commons', 'img/chart.gif')}" width="24" height="24" border="0" align="absmiddle">&nbsp;<span class="generic-label">Visualizza grafico</span></button>
		</td>
	</tr>	
</table>
<j:bind prop="voceBudget">
	<j:hidden id="voceBudget" />
</j:bind>
</j:form>