
<div class="col-md-12">
<div style="margin-top:30%;" >	
   
        <div class="login-box box-cadastro"  style=" background:#fff">

            <form action="" method="post"  id="form2">
                
                <div class="col-md-6">
                <input type="text" name="usu_nome" id="usu_nome" placeholder="Nome" />
                </div>
                
                <div class="col-md-6">
                <input type="text" name="usu_email" id="usu_email" placeholder="E-mail" />
                </div>
                
                <div class="col-md-6">
                <input type="text" name="usu_cpf" id="usu_cpf" placeholder="CPF" />
                </div>
                
                 <div class="col-md-6">
                <input type="text" name="usu_celular" id="usu_celular" placeholder="Celular" />
                 </div>
                 
                  <input type="text" name="usu_aniver" id="usu_aniver" placeholder="Data de nascimento" />
                
                <input type="hidden" name="terminal-cadastro" />
                <button
                    type="button"
                    style="width: 100%; height: 50px"
                    onclick="LoginCadastro.cadastro()">Cadastrar</button>
            </form>
 
        </div>
	
     </div>
</div>
  
  
      <script src="<?php echo base; ?>assets/js/jquery.maskedinput.min.js" ></script>

    
    <script type="text/javascript">
 
jQuery(function($){

$("#usu_aniver").mask("99/99/9999");
$("#usu_celular").mask("(99) 999-999999");
$("#usu_cpf").mask("999.999.999-99");
});

LoginCadastro = {
	logar : function(){
        $.ajax({
            type:   'GET',
             url:    BASE_URL,
             data:   $('#form1').serialize(),
			 dataType:	'json',
            success: function(d){
                if (d != 'null' && d.fid_cpf > '') {
                    location.href = BASE_URL + 'cliente-dashboard';
                } else {
					alert('Usuário/Senha incorreto.')
				}

            }
        });

    },
	cadastro : function(){

		
		$.ajax({
            type:   'POST',
             url:    BASE_URL,
             data:   $('#form2').serialize(),
             success: function(d){

                if (d == 'Cadadstro realizado com sucesso!') {
                    location.href = BASE_URL + 'cliente-dashboard';
                } else {
					alert(d);
				}

            }
        });
		
	}

}

</script>
  
