:id => nil,
:class => 'file_selector',
:multiple => true,
+ :onchange => 'addInputFiles(this);',
:data => {
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
} %>
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
</span>
-<%= javascript_tag do %>
- $('input.file_selector').on('change', function(){addInputFiles(this);});
-<% end %>
<% content_for :header_tags do %>
<%= javascript_include_tag 'attachments' %>
}
}
- clearedFileInput.insertAfter('#attachments_fields').on('change', function(){addInputFiles(this);});
+ clearedFileInput.insertAfter('#attachments_fields');
}
function uploadAndAttachFiles(files, inputEl) {