diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2014-04-18 17:26:25 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2014-04-18 17:26:25 +0200 |
commit | ca33f32b607966b9d774ae1c6261031056212a33 (patch) | |
tree | ea59a57728b684831a31e0d4b1779eb862be9e7f | |
parent | 9429087f67d5babe32ff496eadca52788e9f2547 (diff) |
Fix submission of multi-folder message selection through hidden form fields
-rw-r--r-- | plugins/zipdownload/zipdownload.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/zipdownload/zipdownload.js b/plugins/zipdownload/zipdownload.js index 0e0249dd3..7629e9b20 100644 --- a/plugins/zipdownload/zipdownload.js +++ b/plugins/zipdownload/zipdownload.js @@ -65,7 +65,13 @@ function rcmail_zipdownload(mode) post._token = rcmail.env.request_token; $.each(post, function(k, v) { - inputs.push($('<input>').attr({type: 'hidden', name: k, value: v})); + if (typeof v == 'object' && v.length > 1) { + for (var j=0; j < v.length; j++) + inputs.push($('<input>').attr({type: 'hidden', name: k+'[]', value: v[j]})); + } + else { + inputs.push($('<input>').attr({type: 'hidden', name: k, value: v})); + } }); if (!form.length) |