[#419] Fixing broken multi-select serialization in prototype 1.7
See https://prototype.lighthouseapp.com/projects/8886/tickets/1180 for details. Contributed by Ben Gunter.
This commit is contained in:
parent
3a14bff746
commit
ae84fff8a2
|
@ -4992,7 +4992,13 @@ var Form = {
|
|||
key = element.name; value = $(element).getValue();
|
||||
if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
|
||||
submit !== false && (!submit || key == submit) && (submitted = true)))) {
|
||||
result = accumulator(result, key, value);
|
||||
if (Object.isArray(value)){
|
||||
value.each(function(value) {
|
||||
result = accumulator(result, key, value);
|
||||
});
|
||||
} else {
|
||||
result = accumulator(result, key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue