Created
November 27, 2013 09:15
-
-
Save jlcampana/7672863 to your computer and use it in GitHub Desktop.
Popurrí jQuery y Formularios
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#boton_submit_etiquetas').click(function() | |
{ | |
$('#formulario').attr('action', '{{etiquetas_url|e}}'); | |
$('#formulario').attr('method', 'POST'); | |
$('#formulario').submit(); | |
}); | |
$('#boton_submit').click(function() | |
{ | |
$('#formulario').attr('action', '{{url_base|e}}'); | |
$('#formulario').attr('method', 'POST'); | |
if(chequeaTicketCaja()) | |
{ | |
$('#formulario').submit(); | |
} | |
else | |
{ | |
showAlertWithMessageAndTitle('Los campos "Ticket" y "Caja" son obligatorios.','Picking'); | |
} | |
}); | |
$('#formulario').submit(function(e) | |
{ | |
$('#boton_submit').attr("disabled", true); | |
var ok = chequeaTRRG(); | |
if(!ok && tipoSubmit == 1) | |
{ | |
mensaje = "<strong>Faltan algunos TR y RG</strong><br><br>Debe especificar el TR y el RG de los tickets seleccionados"; | |
showAlertWithMessage(mensaje); | |
$('#boton_submit').attr("disabled", false); | |
e.preventDefault(); | |
} | |
}); | |
$('#boton_buscar_reservas').click( function() | |
{ | |
$('#form_search_reservation').validate( | |
{ | |
rules: | |
{ | |
search_text:{required : true , minlength : 1 } | |
} | |
, | |
messages: | |
{ | |
search_text: { required: "", minlength : "" } | |
} | |
,submitHandler: function(form) | |
{ | |
$('#ventana_modal_busqueda').modal('hide'); | |
form.submit(); | |
//$('#boton_buscar_reservas').attr("disabled", true); | |
} | |
}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment