Check attachment size when the user selects a file (#9667).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7926 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-11-25 22:32:07 +00:00
parent fe45251349
commit 7ed7d8984d
46 changed files with 58 additions and 1 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
<span id="attachments_fields">
<span>
<%= file_field_tag 'attachments[1][file]', :size => 30, :id => nil, :class => 'file' -%>
<%= file_field_tag 'attachments[1][file]', :size => 30, :id => nil, :class => 'file',
:onchange => "checkFileSize(this, #{Setting.attachment_max_size.to_i.kilobytes}, '#{escape_javascript(l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)))}');" -%>
<label class="inline"><%= l(:label_optional_description) %><%= text_field_tag 'attachments[1][description]', '', :size => 60, :id => nil, :class => 'description' %></label>
<%= link_to_function(image_tag('delete.png'), 'removeFileField(this)', :title => (l(:button_delete))) %>
</span>