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

<script type="text/javascript">
	function modificaPianoFunction() {
		var form = document.getElementById('modificaPianoForm');
		juiceSubmitForm(form, -1);
	}
	
	function closeDialog() {
		parent.hideModal('modalModificaPiano');
		return false;
	}
</script>

<j:form id="modificaPianoForm" name="modificaPiano" event="modificaPiano" enctype="multipart/form-data" method="POST" clientValidatorProvider="it.cedaf.juice.mvc.modules.shell.view.helper.JavascriptClientValidatorProvider">
	<j:bind>
		<shell:error />
	</j:bind>
	<j:bind prop="selectedRow">
		<j:hidden id="selectedRow"/>
	</j:bind>
	<j:bind prop="dmKey">
		<j:hidden id="dmKey"/>
	</j:bind>
	<j:bind prop="richiesta">
		<j:hidden id="richiesta"/>
	</j:bind>
	
	<br>
	<table border="0" cellpadding="0" cellspacing="3" width="100%">		
		<tr>
      		<td class="form-label">
    			Data inizio variazione
    		</td>
    		<td class="form-values">
		    	<j:bind prop="dataVariazione">
					<j:text class="form-date" id="dataInizioCld"/>
					<shell:calendar inputId="dataInizioCld" />
					<shell:error />
				</j:bind>
		   	</td>
		</tr>
		
		
		<tr>
			<td class="form-label">
				Includi giorni festivi
			</td>
			<td class="form-values">									
				<j:bind prop="includiGiorniFestivi">
					<j:valueSetIterator>
						<j:radio/>${j:getValueSetItem().description}&nbsp;&nbsp;
					</j:valueSetIterator>
					<shell:error />
				</j:bind>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				Giorni
			</td>
			<td class="form-values">
				<j:bind prop="giorniSettimana">
					<j:valueSetIterator>
						<j:checkbox id="gsCheck"/>${j:getValueSetItem().description}<br>
			        </j:valueSetIterator>
					<shell:error />
				</j:bind>
					
				<%-- 			
				<table><tr>				
				<td class="form-values">
					<bui:out slave="${_slave}" modes="view">
						<j:tile slave="${_slave}" name="shell.plaintext" prop="giorniSettimana" />
					</bui:out>				
					<bui:out slave="${_slave}" modes="create,update">									
						<j:bind prop="giorniSettimana">
							<j:valueSetIterator>
								<j:checkbox id="gsCheck"/>${j:getValueSetItem().description}<br>
					        </j:valueSetIterator>
							<shell:error />
						</j:bind>
					</bui:out>
				</td>
				<td style="vertical-align:top;">
					<bui:out slave="${_slave}" modes="create,update">
						&nbsp;&nbsp;<button class="generic-button ui-state-default ui-corner-all" onClick="javascript:setGiorniSettimanaCheck('1111100'); return false;">&nbsp;Lun-Ven&nbsp;</button>
						<br><div style="height:5px;"></div>
						&nbsp;&nbsp;<button class="generic-button ui-state-default ui-corner-all" onClick="javascript:setGiorniSettimanaCheck('1111110'); return false;">&nbsp;Lun-Sab&nbsp;</button>
						<br><div style="height:5px;"></div>
						&nbsp;&nbsp;<button class="generic-button ui-state-default ui-corner-all" onClick="javascript:setGiorniSettimanaCheck('1111111'); return false;">&nbsp;Lun-Dom&nbsp;</button>
					</bui:out>
					&nbsp;
				</td>
				
				</tr></table>
				--%>
				
			</td>
		</tr>
		<tr>
			<td class="form-label">
				Orario
			</td>
			<td class="form-values">									
				<j:bind prop="noteOrario">
					<j:text id="noteOrario" class="form-normal-text" />
					<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="return closeDialog();"><img src="${j:getResourceUrlOfModule('shell', 'img/misc/cancel-small.gif')}" width="16" height="16" border="0" align="absmiddle">&nbsp;Annulla</button>
				<button class="generic-button ui-state-default ui-corner-all" onclick="modificaPianoFunction();"><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>