Skip to content

Commit

Permalink
Aplicadas abas no cadastro de clientes. Falta melhorar um pouco o vis…
Browse files Browse the repository at this point in the history
…ual (refs #26)
  • Loading branch information
InFog committed Jul 1, 2011
1 parent 2b383e6 commit 94a0db6
Show file tree
Hide file tree
Showing 5 changed files with 194 additions and 195 deletions.
200 changes: 105 additions & 95 deletions application/views/clientes/dados.php
Original file line number Diff line number Diff line change
@@ -1,97 +1,107 @@
<h2><?php echo $titulo_pagina; ?></h2>
<div class="div_direita">
<p>Dados adicionais: </p>
<input type="button" id="btn_exibir_endereco" value="Exibir endereço" />
<input type="button" id="btn_exibir_detalhes" value="Exibir detalhes" />
<div id="abas">
<ul>
<li>
<a href="#dados_basicos">Dados básicos</a>
</li>
<li>
<a href="#dados_endereco">Endereço</a>
</li>
<li>
<a href="#dados_detalhes">Detalhes</a>
</li>
</ul>
<div id="dados_basicos">
<table>
<tr>
<th colspan="2" class="subtitulo">Dados Básicos</th>
</tr>
<tr>
<th style="width: 200px;">Nome:</th>
<td><?php echo $cliente['nome']; ?></td>
</tr>
<tr>
<th>Telefone:</th>
<td><?php echo $cliente['telefone1']; ?></td>
</tr>
<tr>
<th>E-mail</th>
<td><?php echo $cliente['email']; ?></td>
</tr>
<tr>
<th>Observações</th>
<td><?php echo nl2br($cliente['observacoes']); ?></td>
</tr>
</table>
</div>
<div id="dados_endereco">
<table>
<tr>
<th colspan="2" class="subtitulo">Endereço</th>
</tr>
<tr>
<th>Contato:</th>
<td><?php echo $cliente['contato']; ?></td>
</tr>
<tr>
<th>Telefone alternativo:</th>
<td><?php echo $cliente['telefone2']; ?></td>
</tr>
<tr>
<th>Celular:</th>
<td><?php echo $cliente['celular']; ?></td>
</tr>
<tr>
<th>Logradouro:</th>
<td><?php echo $cliente['logradouro']; ?></td>
</tr>
<tr>
<th>Número:</th>
<td><?php echo $cliente['numero']; ?></td>
</tr>
<tr>
<th>Complemento:</th>
<td><?php echo $cliente['complemento']; ?></td>
</tr>
<tr>
<th>Bairro:</th>
<td><?php echo $cliente['bairro']; ?></td>
</tr>
<tr>
<th>Cidade:</th>
<td><?php echo $cliente['cidade']; ?></td>
</tr>
<tr>
<th>Estado:</th>
<td><?php echo $cliente['estado']; ?></td>
</tr>
<tr>
<th>CEP:</th>
<td><?php echo $cliente['cep']; ?></td>
</tr>
</table>
</div>
<div id="dados_detalhes">
<table>
<tr>
<th colspan="2" class="subtitulo">Detalhes</th>
</tr>
<tr>
<th>Razão Social</th>
<td><?php echo $cliente['razao_social']; ?></td>
</tr>
<tr>
<th>CPF:</th>
<td><?php echo $cliente['cpf']; ?></td>
</tr>
<tr>
<th>CNPJ:</th>
<td><?php echo $cliente['cnpj']; ?></td>
</tr>
<tr>
<th>Documento:</th>
<td><?php echo $cliente['documento']; ?></td>
</tr>
</table>
</div>
</div>
<table>
<tr>
<th colspan="2" class="subtitulo">Dados Básicos</th>
</tr>
<tr>
<th style="width: 200px;">Nome:</th>
<td><?php echo $cliente['nome']; ?></td>
</tr>
<tr>
<th>Telefone:</th>
<td><?php echo $cliente['telefone1']; ?></td>
</tr>
<tr>
<th>E-mail</th>
<td><?php echo $cliente['email']; ?></td>
</tr>
<tr>
<th>Observações</th>
<td><?php echo nl2br($cliente['observacoes']); ?></td>
</tr>
</table>
<div id="campos_endereco" style="display: none;">
<table>
<tr>
<th colspan="2" class="subtitulo">Endereço</th>
</tr>
<tr>
<th>Contato:</th>
<td><?php echo $cliente['contato']; ?></td>
</tr>
<tr>
<th>Telefone alternativo:</th>
<td><?php echo $cliente['telefone2']; ?></td>
</tr>
<tr>
<th>Celular:</th>
<td><?php echo $cliente['celular']; ?></td>
</tr>
<tr>
<th>Logradouro:</th>
<td><?php echo $cliente['logradouro']; ?></td>
</tr>
<tr>
<th>Número:</th>
<td><?php echo $cliente['numero']; ?></td>
</tr>
<tr>
<th>Complemento:</th>
<td><?php echo $cliente['complemento']; ?></td>
</tr>
<tr>
<th>Bairro:</th>
<td><?php echo $cliente['bairro']; ?></td>
</tr>
<tr>
<th>Cidade:</th>
<td><?php echo $cliente['cidade']; ?></td>
</tr>
<tr>
<th>Estado:</th>
<td><?php echo $cliente['estado']; ?></td>
</tr>
<tr>
<th>CEP:</th>
<td><?php echo $cliente['cep']; ?></td>
</tr>
</table>
</div>
<div id="campos_detalhes" style="display: none;">
<table>
<tr>
<th colspan="2" class="subtitulo">Detalhes</th>
</tr>
<tr>
<th>Razão Social</th>
<td><?php echo $cliente['razao_social']; ?></td>
</tr>
<tr>
<th>CPF:</th>
<td><?php echo $cliente['cpf']; ?></td>
</tr>
<tr>
<th>CNPJ:</th>
<td><?php echo $cliente['cnpj']; ?></td>
</tr>
<tr>
<th>Documento:</th>
<td><?php echo $cliente['documento']; ?></td>
</tr>
</table>
</div>
152 changes: 83 additions & 69 deletions application/views/clientes/formulario.php
Original file line number Diff line number Diff line change
@@ -1,76 +1,90 @@
<h2><?php echo $titulo_pagina; ?></h2>
<form id="form_cliente" method="post" action="<?php echo site_url(); ?>clientes/gravar">
<div class="div_direita">
<p>Dados adicionais: </p>
<input type="button" id="btn_exibir_endereco" value="Exibir endereço" />
<input type="button" id="btn_exibir_detalhes" value="Exibir detalhes" />
</div>
<input type="hidden" name="id" value="<?php echo $cliente['id']; ?>" />
<fieldset>
<legend>Dados básicos</legend>
<label for="nome">* Nome:
<input type="text" name="nome" id="nome" value="<?php echo $cliente['nome']; ?>" />
</label>
<label for="telefone1">Telefone:
<input type="text" name="telefone1" id="telefone1" class="fone" value="<?php echo $cliente['telefone1']; ?>" />
</label>
<label for="email">E-mail:
<input type="text" name="email" id="email" value="<?php echo $cliente['email']; ?>" />
</label>
<label for="observacoes">Observações:
<textarea name="observacoes" id="observacoes" rows="" cols=""><?php echo $cliente['observacoes']; ?></textarea>
</label>
</fieldset>
<fieldset id="campos_endereco" style="display: none;">
<legend>Endereço</legend>
<label for="contato">Contato:
<input type="text" name="contato" id="contato" maxlength="100" value="<?php echo $cliente['contato']; ?>" />
</label>
<label for="telefone2">Telefone alternativo:
<input type="text" name="telefone2" id="telefone2" class="fone" maxlength="13" value="<?php echo $cliente['telefone2']; ?>" />
</label>
<label for="celular">Celular:
<input type="text" name="celular" id="celular" class="fone" maxlength="13" value="<?php echo $cliente['celular']; ?>" />
</label>
<label for="logradouro">Logradouro:
<input type="text" name="logradouro" id="logradouro" maxlength="140" value="<?php echo $cliente['logradouro']; ?>" />
</label>
<label for="numero">Número:
<input type="text" name="numero" id="numero" maxlength="10" value="<?php echo $cliente['numero']; ?>" />
</label>
<label for="complemento">Complemento:
<input type="text" name="complemento" id="complemento" maxlength="120" value="<?php echo $cliente['complemento']; ?>" />
</label>
<label for="bairro">Bairro:
<input type="text" name="bairro" id="bairro" maxlength="120" value="<?php echo $cliente['bairro']; ?>" />
</label>
<label for="cidade">Cidade:
<input type="text" name="cidade" id="cidade" maxlength="120" value="<?php echo $cliente['cidade']; ?>" />
</label>
<label for="estado">Estado:
<input type="text" name="estado" id="estado" maxlength="2" value="<?php echo $cliente['estado']; ?>" />
</label>
<label for="cep">CEP:
<input type="text" name="cep" id="cep" maxlength="9" value="<?php echo $cliente['cep']; ?>" />
</label>
</fieldset>
<fieldset id="campos_detalhes" style="display: none;">
<legend>Detalhes</legend>
<label for="razao_social">Razão Social:
<input type="text" name="razao_social" id="razao_social" maxlength="100" value="<?php echo $cliente['razao_social']; ?>" />
</label>
<label for="cpf">CPF:
<input type="text" name="cpf" id="cpf" maxlength="14" value="<?php echo $cliente['cpf']; ?>" />
</label>
<label for="cnpj">CNPJ:
<input type="text" name="cnpj" id="cnpj" maxlength="18" value="<?php echo $cliente['cnpj']; ?>" />
</label>
<label for="documento">Outro documento:
<input type="text" name="documento" id="documento" maxlength="20" value="<?php echo $cliente['documento']; ?>" />
</label>
</fieldset>
<div id="abas">
<ul>
<li>
<a href="#dados_basicos">Dados básicos</a>
</li>
<li>
<a href="#dados_endereco">Endereço</a>
</li>
<li>
<a href="#dados_detalhes">Detalhes</a>
</li>
</ul>
<div id="dados_basicos">
<fieldset>
<legend>Dados básicos</legend>
<label for="nome">* Nome:
<input type="text" name="nome" id="nome" value="<?php echo $cliente['nome']; ?>" />
</label>
<label for="telefone1">Telefone:
<input type="text" name="telefone1" id="telefone1" class="fone" value="<?php echo $cliente['telefone1']; ?>" />
</label>
<label for="email">E-mail:
<input type="text" name="email" id="email" value="<?php echo $cliente['email']; ?>" />
</label>
<label for="observacoes">Observações:
<textarea name="observacoes" id="observacoes" rows="" cols=""><?php echo $cliente['observacoes']; ?></textarea>
</label>
</fieldset>
</div>
<div id="dados_endereco">
<fieldset>
<legend>Endereço</legend>
<label for="contato">Contato:
<input type="text" name="contato" id="contato" maxlength="100" value="<?php echo $cliente['contato']; ?>" />
</label>
<label for="telefone2">Telefone alternativo:
<input type="text" name="telefone2" id="telefone2" class="fone" maxlength="13" value="<?php echo $cliente['telefone2']; ?>" />
</label>
<label for="celular">Celular:
<input type="text" name="celular" id="celular" class="fone" maxlength="13" value="<?php echo $cliente['celular']; ?>" />
</label>
<label for="logradouro">Logradouro:
<input type="text" name="logradouro" id="logradouro" maxlength="140" value="<?php echo $cliente['logradouro']; ?>" />
</label>
<label for="numero">Número:
<input type="text" name="numero" id="numero" maxlength="10" value="<?php echo $cliente['numero']; ?>" />
</label>
<label for="complemento">Complemento:
<input type="text" name="complemento" id="complemento" maxlength="120" value="<?php echo $cliente['complemento']; ?>" />
</label>
<label for="bairro">Bairro:
<input type="text" name="bairro" id="bairro" maxlength="120" value="<?php echo $cliente['bairro']; ?>" />
</label>
<label for="cidade">Cidade:
<input type="text" name="cidade" id="cidade" maxlength="120" value="<?php echo $cliente['cidade']; ?>" />
</label>
<label for="estado">Estado:
<input type="text" name="estado" id="estado" maxlength="2" value="<?php echo $cliente['estado']; ?>" />
</label>
<label for="cep">CEP:
<input type="text" name="cep" id="cep" maxlength="9" value="<?php echo $cliente['cep']; ?>" />
</label>
</fieldset>
</div>
<div id="dados_detalhes">
<fieldset>
<legend>Detalhes</legend>
<label for="razao_social">Razão Social:
<input type="text" name="razao_social" id="razao_social" maxlength="100" value="<?php echo $cliente['razao_social']; ?>" />
</label>
<label for="cpf">CPF:
<input type="text" name="cpf" id="cpf" maxlength="14" value="<?php echo $cliente['cpf']; ?>" />
</label>
<label for="cnpj">CNPJ:
<input type="text" name="cnpj" id="cnpj" maxlength="18" value="<?php echo $cliente['cnpj']; ?>" />
</label>
<label for="documento">Outro documento:
<input type="text" name="documento" id="documento" maxlength="20" value="<?php echo $cliente['documento']; ?>" />
</label>
</fieldset>
</div>
</div><!-- abas -->
<div class="div_direita">
<input type="button" value="Cancelar" onclick="window.location = '<?php echo site_url(); echo ($cliente['id'] != '0') ? 'clientes/dados/'.$cliente['id'] : 'clientes'; ?>'" />
<input type="submit" value="Enviar" />
</div>
</form>
</form>
2 changes: 2 additions & 0 deletions application/views/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/yahoo.css" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/base.css" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/aligatoro.css" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/south-street/jquery-ui-1.8.14.custom.css" />
<!-- / CSS -->

<script type="text/javascript">
Expand Down Expand Up @@ -82,6 +83,7 @@
<!-- Javascript -->
<script src="<?php echo base_url(); ?>js/jquery-1.5.min.js" type="text/javascript"></script>
<script src="<?php echo base_url(); ?>js/jquery.corner.js" type="text/javascript"></script>
<script src="<?php echo base_url(); ?>js/jquery-ui-1.8.14.custom.min.js" type="text/javascript"></script>
<script src="<?php echo base_url(); ?>js/jquery.maskedinput.js" type="text/javascript"></script>
<script src="<?php echo base_url(); ?>js/jquery.validate.min.js" type="text/javascript"></script>
<script src="<?php echo base_url(); ?>js/jquery.validate.cpfcnpj.js" type="text/javascript"></script>
Expand Down
Loading

0 comments on commit 94a0db6

Please sign in to comment.