<div id="popbox_upload" style="margin-top: -30px;margin-left: -20px;margin-right: -10px;">
  <div class="upload_con">
    <h2>上传资源</h2>
    <div class="upload_box">
      <%= error_messages_for 'attachment' %>
      <div id="network_issue" style="color: red; display: none;">上传出现错误，请您检查您的网络环境，并刷新页面重新上传。</div>
      <%= form_tag(course_files_path(course), :multipart => true,:remote => true,:method => :post,:name=>"upload_form") do %>
          <label style="margin-top:3px;">文件浏览：</label>
          <%= render :partial => 'attachement_list',:locals => {:course => course} %>
          <div class="cl"></div>
          <a id="submit_resource" href="javascript:void(0);" class="upload_btn" onclick="submit_resource();">确&nbsp;&nbsp;认</a>
          <a href="javascript:void(0);" class="upload_btn upload_btn_grey" onclick="closeModal();">取&nbsp;&nbsp;消</a>
      <% end %>
    </div>

  </div>
  <% content_for :header_tags do %>
      <%= javascript_include_tag 'attachments' %>
  <% end %>
</div>

<script>
  function submit_resource()
  {
      $('#submit_resource').parent().submit();
  }
</script>