<div id="divFormularioAplicacao" >
	<div class='row-fluid'>
		<form name='formCadastroAplicacao' action='${ctx}/pages/cadastroAplicacao/cadastroAplicacao'>
			<input type='hidden' name='idAplicacao' id='idAplicacao'/>
			<input type='hidden' name='idResponsavel' id='idResponsavel'/>
			
			<!-- REQUISITOS DA APLICACAO -->
			<input type='hidden' name='colItens_Delecao_Requisito' id="colItens_Delecao_Requisito"/>
			<input type='hidden' name='colItens_Requisitos_Serialize' id="colItens_Requisitos_Serialize"/>
			<input type="hidden" name="rowIndexRequisito" id="rowIndexRequisito"/>

			<!-- CLIENTES DA APLICACAO -->
			<input type='hidden' name='colItens_Delecao_Cliente' id="colItens_Delecao_Cliente"/>
			<input type='hidden' name='colItens_Clientes_Serialize' id="colItens_Clientes_Serialize"/>

			<div class='row-fluid'>
				<div class='span3'>
					<label class="strong campoObrigatorio"><fmt:message key="citcorpore.comum.nome" /></label>
					<input class="span12 Valid[Required] Description[citcorpore.comum.nome]" id="nome" name="nome" type='text' maxlength="256" />
				</div>
				<div class='span3'>
					<label class="strong"><fmt:message key="portfolio.aplicacao.ultimaversao" /></label>
					<input class="span12" id="ultimaVersaoDisponivel" name="ultimaVersaoDisponivel" type='text' maxlength="100" />
				</div>
				<div class='span3'>
					<label class="strong"><fmt:message key="portfolio.aplicacao.responsavel" /></label>
					<input class="span12" id="nomeResponsavel" name="nomeResponsavel" type='text' onclick="abrirModalResponsavel();" readonly="readonly" maxlength="256" style="cursor: pointer;"/>
				</div>
			</div>

			<div class="widget widget-tabs widget-tabs-double widget-tabs-vertical row-fluid row-merge">
				<div class="widget-head span2" id="tabs-vertical-aplicacao">
					<ul>
						<li class="active">
							<span href="#tabRequisitosAplicacao" data-toggle="tab">
								<a class="glyphicons notes_2" data-toggle="tab"> <i></i>
									<span><fmt:message key="portfolio.aplicacao.requisitos" /></span>
								</a>
							</span>
						</li>
						<li>
							<span href="#tabClientesAplicacao" data-toggle="tab">
								<a class="glyphicons share_alt" data-toggle="tab"> <i></i>
									<span><fmt:message key="portfolio.aplicacao.clientes" /></span>
								</a>
							</span>
						</li>
					</ul>
				</div>
				<div class="widget-body span10">
					<div class="tab-content">
						<div class="tab-pane active" id="tabRequisitosAplicacao">
							<div class="row-fluid">
								<div class="span12">
									<button type='button' class="btn btn-small btn-default btn-icon glyphicons circle_plus" onclick="abrirModalAplicacaoRequisito();"><i></i>
										<fmt:message key="portfolio.aplicacao.adicionarRequisito" />
									</button>
								</div>
							</div>
							<div class="separator"></div>
							<div class="row-fluid divTabelasCadastroAplicacao">
								<table id="tblRequisitoAplicacao" class="dynamicTable table table-striped table-bordered table-condensed">
									<tr>
										<th><fmt:message key="portfolio.aplicacao.requisito" /></th>
										<th><fmt:message key="portfolio.aplicacao.status" /></th>
										<th class="center" style="width: 60px;"><fmt:message key="citcorpore.comum.acoes" /></th>
									</tr>
								</table>
							</div>
						</div>
						<div class="tab-pane" id="tabClientesAplicacao">
							<div class="row-fluid">
								<div class="span12">
									<button type='button' class="btn btn-small btn-default btn-icon glyphicons circle_plus" onclick="abrirModalAplicacaoCliente();"><i></i>
										<fmt:message key="portfolio.aplicacao.adicionarCliente" />
									</button>
								</div>
							</div>
							<div class="separator"></div>
							<div class="row-fluid divTabelasCadastroAplicacao">
								<table id="tblClienteAplicacao" class="dynamicTable table table-striped table-bordered table-condensed">
									<tr>
										<th><fmt:message key="portfolio.aplicacao.cliente" /></th>
										<th class="center" style="width: 60px;"><fmt:message key="citcorpore.comum.acoes" /></th>
									</tr>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>

			<div class="separator"></div>

			<div class='row-fluid'>
				<button type='button' name='btnGravar' class="lFloat btn btn-icon btn-primary btnGravar" onclick='gravarAplicacao();'><i></i><fmt:message key="citcorpore.comum.gravar" /></button>
				<button type="button" name='btnLimpar' class="lFloat btn btn-icon btn-primary" onclick='limparAplicacao();'><i></i><fmt:message key="citcorpore.comum.limpar" /></button>
				<button type='button' name='btnUpDate' class="lFloat btn btn-icon btn-primary btnUpDate" onclick='excluirAplicacao();'><i></i><fmt:message key="citcorpore.comum.excluir" /></button>
			</div>

		</form>
	</div>
</div>

<div class="modal modal-medium hide fade" id="modal-aplicacao-responsavel">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		<h3 class="title"> <fmt:message key="citcorpore.comum.responsavel" /> </h3>
	</div>
	<div class="modal-body modal-body-max-height">
		<form name='formPesquisaResponsavelAplicacao'>
			<cit:findField formName='formPesquisaResponsavelAplicacao' lockupName='LOOKUP_EMPREGADO' id='LOOKUP_EMPREGADO' heigth='400' javascriptCode='true' htmlCode='true' />
		</form>
	</div>
</div>

<div class="modal modal-medium hide fade" id="modal-aplicacao-cliente">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		<h3 class="title"> <fmt:message key="portfolio.aplicacao.cliente" /> </h3>
	</div>
	<div class="modal-body modal-body-max-height">
		<form name='formPesquisaClienteAplicacao'>
			<input type='hidden' name='idAplicacaoCliente' id="idAplicacaoCliente"/>
			<input type='hidden' name='idCliente' id="idCliente"/>
			<input type='hidden' name='nomeCliente' id="nomeCliente"/>
			<cit:findField formName='formPesquisaClienteAplicacao' lockupName='LOOKUP_CLIENTE' id='LOOKUP_CLIENTE_APLICACAO' heigth='400' javascriptCode='true' htmlCode='true' />
		</form>
	</div>
</div>


<div class="modal modal-smaller hide fade" id="modal-aplicacao-requisitos">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		<h3 class="title"> <fmt:message key="portfolio.aplicacao.requisito" /> </h3>
	</div>
	<div class="modal-body modal-body-max-height">
		<form name='formAplicacaoRequisito' id="formAplicacaoRequisito">
			<input type='hidden' name='idRequisitoAplicacao' id="idRequisitoAplicacao"/>
			<%@include file='/pages/cadastroAplicacao/cadastroAplicacaoConteudo/cadastroAplicacaoConteudoRequisitos.jsp' %>
		</form>
	</div>
</div>
