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

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

		loadStandardSelectOptionsAndFill('idEnteErogatore', 
		'it.cedaf.icare.interventi.control.binding.requestbean.valuesetproviders.EnteErogatoreBuonoValueSetProvider(azione, dataRif, dmKey, selectedRow)', 
		params, '');
	}

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


</script>

<j:form id="duplicazioneBuonoForm" name="duplicazioneBuonoAttivazione" event="duplicazioneBuono" 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 class="form-label">
    			Data Inizio Intervento<span class="form-label-required">�*</span>
    		</td>
    		<td class="form-values">
		    	<j:bind prop="dataInizio">
					<j:text class="form-date" id="dataInizioCld" onChange="javascript:onChangeDataInizio(this);" />
					<shell:calendar inputId="dataInizioCld" />
					<shell:error />
				</j:bind>
		   	</td>
		</tr>
		<c:if test="${!empty dto_showSceltaEnteAccreditato && dto_showSceltaEnteAccreditato == 'true'}">
		<tr>
      		<td class="form-label">
    			Ente Erogatore<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>
		</c:if>
		<tr>
			<td>&nbsp;</td>
			<td style="padding: 15px 4px 5px 4px;">
				<button class="generic-button ui-state-default ui-corner-all" onclick="duplicazioneBuonoAccr();"><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>