<div id="popbox_upload" style="margin-top: -30px;margin-left: -20px;margin-right: -10px;">
  <div class="upload_con">
    <h2>将此课件引入我的课程资源库</h2>
    <% if error == '403' %>
      <div class="upload_box">
        <div style="color: red;">您没有权限引用此资源</div>
      </div>
    <% else %>
        <div class="upload_box">
          <div id="error_show" style="color: red;"></div>
          <%= form_tag course_attach_relations_path,
                       method: :post,
                       remote: true,
                       id: "relation_file_form" do %>
              <%= hidden_field_tag(:file_id, file.id) %>
              <%= content_tag('div', courses_check_box_tags('courses[course][]', User.current.courses,course,file), :id => 'courses')%>
              <a id="submit_quote" href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_quote();">引&nbsp;&nbsp;用</a><a href="javascript:void(0)" class="blue_btn grey_btn fl c_white" onclick="closeModal();">取&nbsp;&nbsp;消</a>
          <% end -%>
        </div>
    <% end %>


  </div>
</div>

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