|
|
|
@ -5,20 +5,24 @@
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="add_avatar">
|
|
|
|
|
<%= file_field_tag 'avatar[image]',
|
|
|
|
|
:id => nil,
|
|
|
|
|
:class => 'file_selector',
|
|
|
|
|
:multiple => false,
|
|
|
|
|
:onchange => 'addInputAvatar(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)),
|
|
|
|
|
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
|
|
|
|
:upload_path => upload_avatar_path(:format => 'js'),
|
|
|
|
|
:description_placeholder => nil ,# l(:label_optional_description)
|
|
|
|
|
:source_type => source.class.to_s,
|
|
|
|
|
:source_id => source.id.to_s
|
|
|
|
|
} %>
|
|
|
|
|
<a href="javascript:void(0);" class="btn_addPic">
|
|
|
|
|
<spam><em>+</em>上传图片</span>
|
|
|
|
|
<%= file_field_tag 'avatar[image]',
|
|
|
|
|
:id => nil,
|
|
|
|
|
:class => 'file_selector',
|
|
|
|
|
:multiple => false,
|
|
|
|
|
:onchange => 'addInputAvatar(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)),
|
|
|
|
|
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
|
|
|
|
:upload_path => upload_avatar_path(:format => 'js'),
|
|
|
|
|
:description_placeholder => nil ,# l(:label_optional_description)
|
|
|
|
|
:source_type => source.class.to_s,
|
|
|
|
|
:source_id => source.id.to_s
|
|
|
|
|
} %>
|
|
|
|
|
<input type="file" tabindex="3" title="支持jpg、jpeg、gif、png格式,文件小于5M" size="3" name="pic" class="filePrew">
|
|
|
|
|
</a>
|
|
|
|
|
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|