编辑分组作品时如果不修改分组成员则不能提交

This commit is contained in:
cxt 2015-12-18 19:48:13 +08:00
parent 6a563d4256
commit 459e1f332b
1 changed files with 5 additions and 1 deletions

View File

@ -34,7 +34,11 @@
<% if @homework.homework_type == 3 %> <% if @homework.homework_type == 3 %>
<span id="min_num_member" style="display: none"><%=@homework.homework_detail_group.min_num %></span> <span id="min_num_member" style="display: none"><%=@homework.homework_detail_group.min_num %></span>
<span id="max_num_member" style="display: none"><%=@homework.homework_detail_group.max_num %></span> <span id="max_num_member" style="display: none"><%=@homework.homework_detail_group.max_num %></span>
<%=hidden_field_tag 'group_member_ids', params[:group_member_ids], :value=>User.current.id %> <% str = User.current.id.to_s%>
<% @work.student_work_projects.where("is_leader = ?", 0).each do |pro| %>
<% str += ','+pro.user_id.to_s %>
<% end %>
<%=hidden_field_tag 'group_member_ids', params[:group_member_ids], :value=>str %>
<% end %> <% end %>
<div> <div>
<input type="text" name="student_work[name]" id="student_work_name" placeholder="请简洁的概括作品的功能或特性" class="InputBox W700" maxlength="200" onkeyup="regexStudentWorkName();" value="<%= @work.name%>"> <input type="text" name="student_work[name]" id="student_work_name" placeholder="请简洁的概括作品的功能或特性" class="InputBox W700" maxlength="200" onkeyup="regexStudentWorkName();" value="<%= @work.name%>">