2015-08-10 09:13:38 +08:00
|
|
|
<div id="popbox_upload" style="margin-top: -30px;margin-left: -20px;margin-right: -10px;">
|
|
|
|
<div class="upload_con">
|
2015-08-11 11:30:17 +08:00
|
|
|
<h2>选择问卷导入本课程</h2>
|
2015-08-10 09:13:38 +08:00
|
|
|
<div class="upload_box">
|
|
|
|
<div id="error_show" style="color: red;"></div>
|
|
|
|
<%= form_tag import_other_poll_poll_index_path,
|
|
|
|
method: :post,
|
|
|
|
remote: true,
|
|
|
|
id: "relation_file_form" do %>
|
|
|
|
<input type="hidden" name="course_id" value="<%= polls_group_id%>" />
|
2015-08-11 11:30:17 +08:00
|
|
|
<%= content_tag('div', poll_check_box_tags('polls[]', polls,polls_group_id), :id => 'courses',:style=> 'width: 300px;')%>
|
2015-08-10 09:13:38 +08:00
|
|
|
<a id="submit_quote" href="javascript:void(0)" class="blue_btn fl c_white" style="margin-left: 0px !important;" onclick="submit_quote();">导 入</a>
|
|
|
|
<a href="javascript:void(0)" class="blue_btn grey_btn fl c_white " onclick="closeModal();">取 消</a>
|
|
|
|
<% end -%>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
2015-08-11 14:32:01 +08:00
|
|
|
function submit_quote() {
|
|
|
|
$('#error_show').html('');
|
|
|
|
var selected = false;
|
|
|
|
for(var i = 0; i < $("input[name='polls[]']").length;i++){
|
|
|
|
if($("input[name='polls[]']")[i].checked){
|
|
|
|
selected = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (selected){
|
|
|
|
$('#submit_quote').parent().submit();
|
|
|
|
closeModal();
|
|
|
|
}else{
|
|
|
|
$('#error_show').html('您没有选择任何问卷');
|
|
|
|
}
|
2015-08-10 09:13:38 +08:00
|
|
|
}
|
|
|
|
</script>
|