diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb
index ca7558a..65ad880 100644
--- a/app/views/attachments/_form.html.erb
+++ b/app/views/attachments/_form.html.erb
@@ -11,8 +11,9 @@
<% end %>
-<%= file_field_tag 'attachments_files',
+<%= file_field_tag 'attachments[dummy][file]',
:id => nil,
+ :class => 'file_selector',
:multiple => true,
:onchange => 'addInputFiles(this);',
:data => {
diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js
index e99f2ac..deac4eb 100644
--- a/public/javascripts/attachments.js
+++ b/public/javascripts/attachments.js
@@ -156,8 +156,7 @@ function handleFileDropEvent(e) {
blockEventPropagation(e);
if ($.inArray('Files', e.dataTransfer.types) > -1) {
-
- uploadAndAttachFiles(e.dataTransfer.files, $('input:file[name=attachments_files]'));
+ uploadAndAttachFiles(e.dataTransfer.files, $('input:file.file_selector'));
}
}
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 6c0ea7f..f3632e8 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -1000,7 +1000,7 @@ class IssuesControllerTest < ActionController::TestCase
get :show, :id => 1
assert_select 'form#issue-form[method=post][enctype=multipart/form-data]' do
- assert_select 'input[type=file][name=?]', 'attachments_files'
+ assert_select 'input[type=file][name=?]', 'attachments[dummy][file]'
end
end
@@ -1569,7 +1569,7 @@ class IssuesControllerTest < ActionController::TestCase
get :new, :project_id => 1, :tracker_id => 1
assert_select 'form[id=issue-form][method=post][enctype=multipart/form-data]' do
- assert_select 'input[name=?][type=file]', 'attachments_files'
+ assert_select 'input[name=?][type=file]', 'attachments[dummy][file]'
end
end