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

<script type="text/javascript">
	/**  */
	function onChangeDataAttivazione() {
		var dataAttivazione = document.getElementById('dataInizioCld').value;
		var dmKey = document.getElementById('dmKey').value;
		var selectedRow = document.getElementById('selectedRow').value;
		var params = 'dataRif=' + dataAttivazione;
		params += '&dmKey=' + dmKey;
		params += '&selectedRow=' + selectedRow;

		loadStandardSelectOptionsAndFill('idEnteErogatore', 
		'it.cedaf.icare.customers.zcompar.binding.requestbean.valuesetproviders.EnteErogatoreBuonoDelegateValueSetProvider(dataRif, dmKey, selectedRow)', 
		params, '');
	}

	/** */
	function attivazioneBuono() {
		var form = document.getElementById('attivazioneBuonoForm');
		juiceSubmitForm(form, -1);
	}


</script>

<j:form id="attivazioneBuonoForm" name="attivazioneBuonoAttivazione" event="attivazioneBuono" enctype="multipart/form-data" method="POST" clientValidatorProvider="it.cedaf.juice.mvc.modules.shell.view.helper.JavascriptClientValidatorProvider">

	<j:bind prop="selectedRow">
		<j:hidden id="selectedRow"/>
	</j:bind>
	<j:bind prop="dmKey">
		<j:hidden id="dmKey"/>
	</j:bind>
	
	<br>
	<table border="0" cellpadding="0" cellspacing="3" width="100%">
		<tr>
			<td colspan="2" class="generic-label" style="padding: 4px 4px 15px 4px;">Si sta procedendo all'attivazione del buono. Indicare la data di attivazione e il fornitore accreditato:</td>
		</tr>	
		<tr>
      		<td class="form-label">
    			Data Attivazione<span class="form-label-required">�*</span>
    		</td>
    		<td class="form-values">
		    	<j:bind prop="dataAttivazione">
					<j:text class="form-date" id="dataInizioCld" onChange="javascript:onChangeDataAttivazione(this);" />
					<shell:calendar inputId="dataInizioCld" />
					<shell:error />
				</j:bind>
		   	</td>
		</tr>
		<tr>
      		<td class="form-label">
    			Fornitore Accreditato<span class="form-label-required">�*</span>
    		</td>
    		<td class="form-values">
		    	<j:bind prop="enteErogatore">
					<j:select class="form-input" id="idEnteErogatore" emptyOptionDescr="" />
					<shell:error />
				</j:bind>
		   	</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td style="padding: 15px 4px 5px 4px;">
				<button class="generic-button ui-state-default ui-corner-all" onclick="attivazioneBuono();"><img src="${j:getResourceUrlOfModule('shell', 'img/misc/confirm-small.gif')}" width="16" height="16" border="0" align="absmiddle">&nbsp;Conferma</button> 													
			</td>
		</tr>							
	</table>
</j:form>