[-] FO : Bad checkbox behavior in FF in OPC

This commit is contained in:
gRoussac
2013-01-08 10:04:30 +01:00
parent 3e5e5baa8c
commit 609abe4656
+17 -11
View File
@@ -482,17 +482,7 @@ $(function() {
// INVOICE ADDRESS
$('#invoice_address').click(function() {
if ($('#invoice_address:checked').length > 0)
{
$('#opc_invoice_address').slideDown('slow');
if ($('#company_invoice').val() === '')
$('#vat_number_block_invoice').hide();
updateState('invoice');
updateNeedIDNumber('invoice');
updateZipCode('invoice');
}
else
$('#opc_invoice_address').slideUp('slow');
bindCheckbox();
});
// VALIDATION / CREATION AJAX
@@ -627,6 +617,7 @@ $(function() {
});
}
bindCheckbox();
bindInputs();
$('#opc_account_form input,select,textarea').change(function() {
@@ -639,6 +630,21 @@ $(function() {
});
function bindCheckbox()
{
if ($('#invoice_address:checked').length > 0)
{
$('#opc_invoice_address').slideDown('slow');
if ($('#company_invoice').val() === '')
$('#vat_number_block_invoice').hide();
updateState('invoice');
updateNeedIDNumber('invoice');
updateZipCode('invoice');
}
else
$('#opc_invoice_address').slideUp('slow');
}
function bindInputs()
{
// Order message update