socialforge/app/views/contests/_upload_img.html.erb

51 lines
2.5 KiB
Plaintext

<div id="sy_popup_box" style="width:1000px;">
<div class="sy_popup_top">
<h3 class="fl">上传图片</h3>
<a href="javascript:void(0);" class="sy_icons_close fr" onclick="hideModal()"></a>
<div class="cl"></div>
</div>
<div class="">
<div style="margin: 10px 20px;">
<a class="BlueCirBtn" onclick="$('#upload_avatar').click();" style="cursor: pointer;">上传图片</a>
<%= file_field_tag 'avatar[image]',
:id => "upload_avatar",
:style => 'display:none;',#added by young
:size => "1",
: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,
:file_type => Redmine::Configuration['pic_types'].to_s,
:type_support_message => l(:error_pic_type),
: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,
:is_direct => 1
} %>
<!--<br/>-->
<!--<span>只支持jpg,png,gif,大小不超过5M</span>-->
</div>
<div class="cl"></div>
<div>
<p style="text-align: center; font-size: 16px;">预览(968px*110px)</p>
<%= image_tag(url_to_avatar(source), :style=>"width:968px;height:110px;",:class=>"mb5 mt10 ml16",:nhname=>'avatar_image') %>
<br/>
</div>
<div class="cl mb10"></div>
<a href="<%= url_for(:controller => 'my', :action => 'save_user_avatar', :source_id => source.id, :source_type => source.class.to_s) %>" data-remote="true" class="sy_btn_blue fr mr16 f14">确&nbsp;&nbsp;定</a>
<a href="javascript:hideModal();" class="fr sy_btn_grey mr5 f14"> 取&nbsp;&nbsp;消</a>
<div class="cl"></div>
</div>
</div>
<script>
function submit_join_course(){
}
function disable_contestant_choose(){
}
</script>