<div>
  <div><a href="javascript:hideModal();" class="box_close"></a></div>
  <div class="cl"></div>
  <div class="pro_new">
    <h3 class="box_h3 mb10">头像设置</h3>
    <div class="uppicBox">
      <input type="button" class="uppic_btn" onclick="$('#upload_avatar').click();" value="浏览.."/>
      <%= 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="showpicBox">
      <p>预览</p>
      <%= image_tag(url_to_avatar(source), :style=>"width:96px;height:96px;",:class=>"mb5 mt10",:nhname=>'avatar_image') %>
      <br/>
      <span >96px*96px</span> <br />
      <div class="mb20"></div>
      <%= image_tag(url_to_avatar(source), :style=>"width:48px;height:48px;",:class=>"mb5",:nhname=>'avatar_image') %>
      <br />
      <span>48px*48px</span> <br />
    </div>
    <div class="cl mb10"></div>
    <a href="javascript:hideModal();" class=" fr grey_btn mr15 f14"> 取&nbsp;&nbsp;消</a>
    <a href="<%= url_for(:controller => 'my', :action => 'save_user_avatar', :source_id => source.id, :source_type => source.class.to_s) %>" data-remote="true" class="blue_btn fr mr10 f14">确&nbsp;&nbsp;定</a>
  </div><!--talknew end-->
  <div class="cl"></div>
</div><!--floatbox end-->