<?php 
$ventoExcluir = "disabled" ;
if ($_carga_tabela_bd->getId() != "")
{
	$ventoExcluir = 'onclick="excluirCargaTabela(\'src/controller/Carga_tabela_bd.php?mod=excluir&id='.$_carga_tabela_bd->getId().'\', '.$_carga_tabela_bd->getTabela()->getId().')"'; 
}	

?>
<div style="border-bottom: solid 1px #cccccc;"><b>Carregar lista tabela</b></div>
<br>
<button class="btnSuccess btnXs " id="btnNovo" onclick="javaScript:abrirFormulario('src/controller/Carga_tabela_bd.php?mod=novo&idTabela=<?php echo $_carga_tabela_bd->getTabela()->getId()?>')" >Novo</button>
<button class="btnDanger btnXs" id="btnExcluir" <?php echo $ventoExcluir;?> >Excluir </button>
<button class="btnDanger btnXs" id="btnCancelar" disabled>Cancelar </button>
<button class="btnSuccess btnXs" id="btnSalvar" disabled onclick="salvarCargaTabela('formDados', <?php echo $_carga_tabela_bd->getTabela()->getId()?>);">Salvar </button>
<br><br>
<form action='src/controller/Carga_tabela_bd.php?mod=salvar' id="formDados">
	<?php if ($_carga_tabela_bd->getId() != ""){?><input type="hidden" class="form" placeholder="" name="id" value="<?php echo $_carga_tabela_bd->getId()?>" valueDefault="<?php echo $_carga_tabela_bd->getId()?>" /><?php }?>
	<input type="hidden" class="form" placeholder="" name="tabela" value="<?php echo $_carga_tabela_bd->getTabela()->getId()?>" valueDefault="<?php echo $_carga_tabela_bd->getTabela()->getId()?>" />
	<label> Descrição do item: </label>
	<input type="text" required class="form" placeholder="" name="descricao" value="<?php echo $_carga_tabela_bd->getDescricao()?>" valueDefault="<?php echo $_carga_tabela_bd->getDescricao()?>" />
	<label> Tabela: </label>
		<div id="comboboxTabelas"> 
			<select class="form" name="tabela_carregada" required  value="<?php echo $_carga_tabela_bd->getTabelaCarregada()->getId()?>" valueDefault="<?php echo $_carga_tabela_bd->getTabelaCarregada()->getId()?>" > 
			<?php foreach ($listaTabelas as $tabelaAtual){ ?>
				<option value="<?php echo $tabelaAtual->getId();?>"><?php echo $tabelaAtual->getTabela();?></option> 
			<?php } ?> 
			</select>
		</div>
</form>	
<script src="../../js/form_colunas_bd.js"> </script>
<script src="../../js/formulario.js"></script>