Browse Source

Fixes Prototypejs Form.serialize() for multiple selects (#7954).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@5586 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/1.1.3
Jean-Philippe Lang 13 years ago
parent
commit
fab0774c4b
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      public/javascripts/prototype.js

+ 7
- 1
public/javascripts/prototype.js View File

@@ -4993,7 +4993,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…
Cancel
Save