#1360 翻页或搜索之前若已经选择了用户数据则给出提示信息
This commit is contained in:
parent
f576fb994b
commit
0ba1477f1b
|
@ -82,7 +82,11 @@
|
|||
<p style="padding-top: 5px"><%= l(:label_role_plural) %>:
|
||||
<% roles.each do |role| %>
|
||||
|
||||
<% if role.id == 10 %> <!-- 默认学生角色 -->
|
||||
<label><%= radio_button_tag 'membership[role_ids][]', role.id, true %> <%= h role %></label>
|
||||
<% else %>
|
||||
<label><%= radio_button_tag 'membership[role_ids][]', role.id %> <%= h role %></label>
|
||||
<% end %>
|
||||
<% end %></p>
|
||||
|
||||
<p><%= submit_tag l(:button_add), :id => 'member-add-submit' %></p>
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<% if @project%>
|
||||
$('#principals_for_new_member').html('<%= escape_javascript(render_principals_for_new_members(@project)) %>');
|
||||
<% elsif @course%>
|
||||
var checked = $("#principals input:checked").size();
|
||||
if(checked > 0)
|
||||
{
|
||||
alert('翻页或搜索后将丢失当前选择的用户数据!');
|
||||
}
|
||||
$('#principals_for_new_member').html('<%= escape_javascript(render_principals_for_new_course_members(@course)) %>');
|
||||
<%end%>
|
||||
var collection=$("#principals_for_new_member").children("#principals").children("label");
|
||||
|
|
Loading…
Reference in New Issue