Feature #18555 » defect-18555-v1.patch
app/views/attachments/_form.html.erb | ||
---|---|---|
30 | 30 |
:multiple => multiple, |
31 | 31 |
:onchange => 'addInputFiles(this);', |
32 | 32 |
:data => { |
33 |
:max_number_of_files_message => l(:error_attachments_too_many), |
|
33 | 34 |
:max_file_size => Setting.attachment_max_size.to_i.kilobytes, |
34 | 35 |
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)), |
35 | 36 |
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, |
config/locales/en.yml | ||
---|---|---|
214 | 214 |
error_unable_delete_issue_status: 'Unable to delete issue status (%{value})' |
215 | 215 |
error_unable_to_connect: "Unable to connect (%{value})" |
216 | 216 |
error_attachment_too_big: "This file cannot be uploaded because it exceeds the maximum allowed file size (%{max_size})" |
217 |
error_attachments_too_many: "This file cannot be uploaded because the maximum number of files that can be attached at the same time has been reached." |
|
217 | 218 |
error_session_expired: "Your session has expired. Please login again." |
218 | 219 |
error_token_expired: "This password recovery link has expired, please try again." |
219 | 220 |
warning_attachments_not_saved: "%{count} file(s) could not be saved." |
public/javascripts/attachments.js | ||
---|---|---|
29 | 29 | |
30 | 30 |
addAttachment.toggle(attachmentsFields.children().length < maxFiles); |
31 | 31 |
return attachmentId; |
32 |
} else { |
|
33 |
alert($('input.file_selector').data('max-number-of-files-message')); |
|
32 | 34 |
} |
33 | 35 |
return null; |
34 | 36 |
} |