<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarGrupoContrato"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>

<zk xmlns="http://www.zkoss.org/2005/zul">
	<window id="winEditarGrupoContrato" border="normal"
		apply="${editarGrupoContratoController}" 
		contentStyle="overflow:auto" height="600px" width="800px" 
		title="${c:l('editarGrupoContratoController.window.title')}" >
		
		<toolbar>
			<hbox spacing="5px" style="padding:1px" align="right">
				<button id="btnApagar" height="20"
					image="/gui/img/remove.png" width="35px"
					tooltiptext="${c:l('tooltiptext.btnApagar')}" />
				<button id="btnSalvar" height="20"
					image="/gui/img/save.png" width="35px" 
					tooltiptext="${c:l('tooltiptext.btnSalvar')}" />
				<button id="btnCerrar"
					onClick="winEditarGrupoContrato.detach()" image="/gui/img/exit.png"
					width="35px"
					tooltiptext="${c:l('tooltiptext.btnFechar')}" />
			</hbox>
		</toolbar>
		
		<tabbox vflex="1" hflex="1">
			<tabs>					
				<tab label="${c:l('editarGrupoContratoController.tab.grupo')}" />
				<tab label="${c:l('editarGrupoContratoController.tab.tarifa')}" />
				<tab label="${c:l('editarGrupoContratoController.tab.tarifaNaoCoberta')}" />
				<tab label="${c:l('editarGrupoContratoController.tab.excecao')}" />				
			</tabs>
			
			<tabpanels style="overflow: auto">
			
				<!-- Grupo -->
				<tabpanel id="tbCliente" >
					<grid fixedLayout="true">
						<columns>
							<column width="25%" />
							<column width="75%" />
						</columns>
						<rows>
							<row>
								<label value="${c:l('label.descricao')}" />
								<textbox id="txtDescricao" 
									constraint="no empty" width="95%" 
									value="@{winEditarGrupoContrato$composer.grupoContrato.nomeGrupoContrato}"
									use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
							</row>
						</rows>
					</grid>
				</tabpanel>
					
				<!-- Tarifa Coberta-->
				<tabpanel id="tbTarifa" >
					<grid fixedLayout="true">
						<columns>
							<column width="25%" />
							<column width="75%" />
						</columns>
						<rows>							
							<row>
			                    <label value="${c:l('label.classe')}"/>
			                    <combobox id="cmbClasse" width="95%" 
			                    	use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" 
			                    	model="@{winEditarGrupoContrato$composer.lsClasse}"
			                    	constraint="no empty" mold="rounded" buttonVisible="true" />
			                </row>
							<row>
								<label value="${c:l('label.origem')}" />
								<combobox id="cmbOrigem" width="95%" 
									constraint="no empty" autodrop="false" mold="rounded" buttonVisible="true"
									use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada" />
							</row>
							<row>
								<label value="${c:l('label.destino')}" />
								<combobox id="cmbDestino" width="95%" 
									constraint="no empty" autodrop="false" mold="rounded" buttonVisible="true"
									use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada" />
							</row>
							<row>
								<label value="${c:l('label.tarifa')}" />
								<decimalbox id="txtTarifa" width="120px"
									constraint="no negative, no zero, no empty" />
							</row>
							<row id="rowIncluir" spans="2" align="middle">
								<hbox >
									<button id="btnAdicionarTarifa"
										height="20" image="/gui/img/add.png" width="35px"
										tooltiptext="${c:l('tooltiptext.btnIncluir')}" />

									<button id="btnRemoverTarifa"
										height="20" image="/gui/img/remove.png" width="35px"
										tooltiptext="${c:l('tooltiptext.btnRemover')}" />									
								</hbox>
							</row>
						</rows>
					</grid>
					<paging id="pagingTarifasGrupo" pageSize="20" />
					<listbox id="tarifaGrupoList"
						use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
						multiple="false">
						<listhead sizable="true">
							<listheader id="lbClasse" image="/gui/img/create_doc.gif"
								label="${c:l('label.classe')}"
								sort="auto(claseservicioId)" />
							<listheader id="lbTarifa" image="/gui/img/create_doc.gif"
								label="${c:l('label.tarifa')}"
								sort="auto(tarifa)" />
							<listheader id="lbOrigem" image="/gui/img/create_doc.gif"
								label="${c:l('label.origem')}"
								sort="auto(origenId)" />
							<listheader id="lbDescOrigem" image="/gui/img/create_doc.gif"
								label="${c:l('label.descricao')}"
								sort="auto(descOrigen)" />
							<listheader id="lbDestino" image="/gui/img/create_doc.gif"
								label="${c:l('label.destino')}"
								sort="auto(destinoId)" />
							<listheader id="lbDescDestino" image="/gui/img/create_doc.gif"
								label="${c:l('label.descricao')}"
								sort="auto(descDestino)" />																		
						</listhead>
					</listbox>
				</tabpanel>
				
				<!-- Tarifa Nao Coberta-->
				<tabpanel id="tbTarifaNaoCoberta" >
					<grid fixedLayout="true">
						<columns>
							<column width="25%" />
							<column width="75%" />
						</columns>
						<rows>							
							<row>
			                    <label value="${c:l('label.classe')}"/>
			                    <combobox id="cmbClasseNaoCoberta" width="95%" 
			                    	use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" 
			                    	model="@{winEditarGrupoContrato$composer.lsClasse}"
			                    	constraint="no empty" mold="rounded" buttonVisible="true" />
			                </row>
							<row>
								<label value="${c:l('label.origem')}" />
								<combobox id="cmbOrigemNaoCoberta" width="95%" 
									constraint="no empty" autodrop="false" mold="rounded" buttonVisible="true"
									use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada" />
							</row>
							<row>
								<label value="${c:l('label.destino')}" />
								<combobox id="cmbDestinoNaoCoberta" width="95%" 
									constraint="no empty" autodrop="false" mold="rounded" buttonVisible="true"
									use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada" />
							</row>
							<row>
								<label value="${c:l('label.tarifa')}" />
								<decimalbox id="txtTarifaNaoCoberta" width="120px"
									constraint="no negative, no zero, no empty" />
							</row>
							<row id="rowIncluirNaoCoberta" spans="2" align="middle">
								<hbox >
									<button id="btnAdicionarTarifaNaoCoberta"
										height="20" image="/gui/img/add.png" width="35px"
										tooltiptext="${c:l('tooltiptext.btnIncluir')}" />

									<button id="btnRemoverTarifaNaoCoberta"
										height="20" image="/gui/img/remove.png" width="35px"
										tooltiptext="${c:l('tooltiptext.btnRemover')}" />									
								</hbox>
							</row>
						</rows>
					</grid>
					<paging id="pagingTarifasNaoCoberta" pageSize="20" />
					<listbox id="tarifaNaoCobertaList"
						use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
						multiple="false">
						<listhead sizable="true">
							<listheader id="lbClasseNaoCoberta" image="/gui/img/create_doc.gif"
								label="${c:l('label.classe')}"
								sort="auto(claseservicioId)" />
							<listheader id="lbTarifaNaoCoberta" image="/gui/img/create_doc.gif"
								label="${c:l('label.tarifa')}"
								sort="auto(tarifa)" />
							<listheader id="lbOrigemNaoCoberta" image="/gui/img/create_doc.gif"
								label="${c:l('label.origem')}"
								sort="auto(origenId)" />
							<listheader id="lbDescOrigemNaoCoberta" image="/gui/img/create_doc.gif"
								label="${c:l('label.descricao')}"
								sort="auto(descOrigen)" />
							<listheader id="lbDestinoNaoCoberta" image="/gui/img/create_doc.gif"
								label="${c:l('label.destino')}"
								sort="auto(destinoId)" />
							<listheader id="lbDescDestinoNaoCoberta" image="/gui/img/create_doc.gif"
								label="${c:l('label.descricao')}"
								sort="auto(descDestino)" />																		
						</listhead>
					</listbox>
				</tabpanel>
				
				<!-- Excecoes -->
				<tabpanel id="tbExcecao" >
					<grid fixedLayout="true">
						<columns>
							<column width="25%" />
							<column width="75%" />
						</columns>
						<rows>
							<row>
								<label id="lbDataInicial" value="${c:l('label.dataInicial')}" />
								<datebox id="datInicial" width="100px"
									format="dd/MM/yyyy"  constraint="no empty"
									maxlength="10" />
							</row>
							<row>
								<label id="lbDataFinal" value="${c:l('label.dataFinal')}" />
								<datebox id="datFinal" width="100px"
									format="dd/MM/yyyy"  constraint="no empty"
									maxlength="10" />
							</row>
							<row>
			                    <label value="${c:l('label.classe')}"/>
			                    <combobox id="cmbClasseExcecao" width="95%" 
			                    	use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" 
			                    	model="@{winEditarGrupoContrato$composer.lsClasse}"
			                    	constraint="no empty" mold="rounded" buttonVisible="true" />
			                </row>
							<row>
								<label value="${c:l('label.origem')}" />
								<combobox id="cmbOrigemExcecao" width="95%" 
									constraint="no empty" autodrop="false" mold="rounded" buttonVisible="true"
									use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada" />
							</row>
							<row>
								<label value="${c:l('label.destino')}" />
								<combobox id="cmbDestinoExcecao" width="95%" 
									constraint="no empty" autodrop="false" mold="rounded" buttonVisible="true"
									use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada" />
							</row>
							<row>
								<label value="${c:l('label.tarifa')}" />
								<decimalbox id="txtTarifaExcecao" width="120px"
									constraint="no negative, no zero, no empty" />
							</row>
							<row id="rowIncluirExcecao" spans="2" align="middle">
								<hbox >
									<button id="btnAdicionarExcecao"
										height="20" image="/gui/img/add.png" width="35px"
										tooltiptext="${c:l('tooltiptext.btnIncluir')}" />

									<button id="btnRemoverExcecao"
										height="20" image="/gui/img/remove.png" width="35px"
										tooltiptext="${c:l('tooltiptext.btnRemover')}" />									
								</hbox>
							</row>
						</rows>
					</grid>
					<paging id="pagingExcecoesGrupo" pageSize="20" />
					<listbox id="excecaoGrupoList"
						use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
						multiple="false">
						<listhead sizable="true">
							<listheader id="lhDataInicial" image="/gui/img/create_doc.gif"
								label="${c:l('label.dataInicial')}"
								sort="auto(dataInicial)" />
							<listheader id="lhDataFinal" image="/gui/img/create_doc.gif"
								label="${c:l('label.dataFinal')}"
								sort="auto(dataFinal)" />
							<listheader id="lbClasseExcecao" image="/gui/img/create_doc.gif"
								label="${c:l('label.classe')}"
								sort="auto(claseservicioId)" />
							<listheader id="lbTarifaExcecao" image="/gui/img/create_doc.gif"
								label="${c:l('label.tarifa')}"
								sort="auto(tarifa)" />
							<listheader id="lbOrigemExcecao" image="/gui/img/create_doc.gif"
								label="${c:l('label.origem')}"
								sort="auto(origenId)" />
							<listheader id="lbDescOrigemExcecao" image="/gui/img/create_doc.gif"
								label="${c:l('label.descricao')}"
								sort="auto(descOrigen)" />
							<listheader id="lbDestinoExcecao" image="/gui/img/create_doc.gif"
								label="${c:l('label.destino')}"
								sort="auto(destinoId)" />
							<listheader id="lbDescDestinoExcecao" image="/gui/img/create_doc.gif"
								label="${c:l('label.descricao')}"
								sort="auto(descDestino)" />																		
						</listhead>
					</listbox>
				</tabpanel>
			</tabpanels>
		</tabbox>
	</window>
</zk>
