Fix #1494
Handle `checkbox`different than other `input` elements (such as text, password ...), by using a different selector and check, if the `checkbox` is checked.
This commit is contained in:
parent
532140d967
commit
fb0f974580
1 changed files with 10 additions and 1 deletions
|
@ -14,12 +14,21 @@
|
||||||
className: className
|
className: className
|
||||||
};
|
};
|
||||||
|
|
||||||
$('input').each(function() {
|
$('input:not([type=checkbox])').each(function() {
|
||||||
var key = $(this).attr('name');
|
var key = $(this).attr('name');
|
||||||
var value = $(this).val();
|
var value = $(this).val();
|
||||||
args[key] = value;
|
args[key] = value;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('input[type=checkbox]').each(function() {
|
||||||
|
var key = $(this).attr('name');
|
||||||
|
var value = $(this).val();
|
||||||
|
|
||||||
|
if($(this).is(":checked")) {
|
||||||
|
args[key] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$('select').each(function() {
|
$('select').each(function() {
|
||||||
var key = $(this).attr('name');
|
var key = $(this).attr('name');
|
||||||
var value = $(this).val();
|
var value = $(this).val();
|
||||||
|
|
Loading…
Reference in a new issue