Commit f7042c95 authored by Dries's avatar Dries
Browse files

- Patch #41385 by Thox: made the upload.module work again.

parent 77130e7a
......@@ -12,7 +12,8 @@ function uploadAutoAttach() {
for (i = 0; input = inputs[i]; i++) {
if (input && hasClass(input, 'upload')) {
var uri = input.value;
var button = input.id.substr(5);
// Extract the button ID based on a subtring of the input name: edit[foo][bar] -> foo-bar
var button = input.name.substr(5, input.name.length - 6).replace('][', '-');
var wrapper = button + '-wrapper';
var hide = button + '-hide';
var upload = new jsUpload(uri, button, wrapper, hide);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment