<style>
#block_login{
	padding:15px 10px;
	background:#fafbfc;
	border:1px solid #f0f2f5;
	border-radius:0px;
	overflow:hidden;}

#block_login .campo{
	text-align:left;
	padding:2px 10px;}

#block_login .btn_login{
	text-align:right;
	padding:2px 10px;}

#block_login .pass_recover{
	text-align:right;
	padding:2px 10px;}

#block_login .col-md-2, .col-md-4, .col-md-9, .col-md-6{
	margin:3px 0;}
	
#block_login .submit{
	float:right;}

#block_login .requerido{
	color:#e52121;}

#error_login{
	display:none;
	overflow:hidden;}
	
	
</style>

<div class="col-md-12">
        
        <div id="block_login" class="col-md-12">
        {$LOGIN_MENSAJE}
        
            <form method="post" id="form_blocklogin">
                <div class="col-md-12 campo"><h4>Acceso a Usuarios Registrados:</h4></div> 	
                <div class="col-md-4 campo"><input class="form-control" type="text" id="user_email" name="user_email" size="30" placeholder="email" /></div>
                <div class="col-md-4 campo"><input class="form-control" type="password"  id="user_password" name="user_password" size="30" placeholder="password" /></div>
                <div class="col-md-4 btn_login"><input class="form-control btn btn-sm btn-primary btnlogin btn-lg" type="submit" value="Ingresar!" /></div>
            	<div id="error_login" class="col-md-12" style="display:none">Ingresa tus Datos.</div>
                <div class="col-md-12 campo"><a href="https://www.afterfuture.net/clientes/pwreset.php" target="_blank">¿Olvidaste tu contraseña?</a></div> 	
            </form>
            
        </div>

</div>



{literal}
<script>
				
			$.validator.setDefaults({
				submitHandler: function() { 
				
						if ($('#user_email').val() != '' && $('#user_password').val() != ''){
							
							$('#loading').show();
							
							var formdata = $('#form_blocklogin').serialize();
							$.ajax({
							  type: "POST",
							  url: "{/literal}{$RUTA_LOGIN}&display=ajax{literal}",
							  data: formdata,
							  success: function(res){
								$('.contenido_ajax').html(res);
								$('#loading').hide();
								}
							
							 })
							
						}
					return false;	
				 }
			});

	
	// Validar Formulario Login
			$("#form_blocklogin").validate({
				
				
				errorLabelContainer: $("#error_login"),
		
				rules: {
					user_email: {
						required: true,
						email: true
					},
					
					user_password: {
						required: true,
						minlength: 0
					},
				},
				
				messages: {
					user_email: {
						required: "",
						email: ""
					},
					
					user_password: {
						required: "",
					},

				}
				
			});

</script>
{/literal}
