fix setButtonStates. The checkboxes are an array.

This commit is contained in:
Isaac Connor 2016-03-01 12:19:46 -05:00
parent 838da183e0
commit bb0dcf3d43
1 changed files with 11 additions and 1 deletions

View File

@ -12,6 +12,16 @@ function setButtonStates( element )
break;
}
}
} else if ( form.elements[i].length )
{
for( var j = 0, j_length = form.elements[i].length; j < j_length; j += 1 ) {
if ( form.elements[j].type == "checkbox" ) {
if ( form.elements[j].checked ) {
if ( checked++ > 1 )
break;
}
}
} // end foreach element
}
$(element).getParent( 'tr' ).toggleClass( 'highlight' );
form.editBtn.disabled = (checked!=1);