From 04e9618a5926fda4cce4f1caf5e23d9da5306fa5 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Fri, 22 May 2015 11:20:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug#2357:=E9=A1=B9=E7=9B=AE--?= =?UTF-8?q?=E9=82=80=E8=AF=B7=E6=B3=A8=E5=86=8C=E7=94=A8=E6=88=B7=EF=BC=8C?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E6=90=9C=E7=B4=A2=E5=90=8E=E8=8B=A5=E5=BF=98?= =?UTF-8?q?=E4=BA=86=E9=80=89=E6=8B=A9=E7=94=A8=E6=88=B7=E6=88=96=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E7=9B=B4=E6=8E=A5=E9=82=80=E8=AF=B7=EF=BC=8C=E5=BB=BA?= =?UTF-8?q?=E8=AE=AE=E4=B8=8D=E8=A6=81=E5=86=8D=E8=AE=A9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=90=9C=E7=B4=A2=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/invite_members.html.erb | 28 +++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/app/views/projects/invite_members.html.erb b/app/views/projects/invite_members.html.erb index d30ecd8e4..97b36406e 100644 --- a/app/views/projects/invite_members.html.erb +++ b/app/views/projects/invite_members.html.erb @@ -1,4 +1,3 @@ -

<%= l(:label_invite_join) %>

@@ -68,5 +67,32 @@ var text=$(label).text(); $(label).attr("title",text); } + + function nh_show_err_message(msg){ + $("#RSide>.flash").remove(); + $("#RSide").prepend('
'+msg+'
'); + } + $('#new_membership').submit(function(){ + var user_ischeck=false; + $("input[name='membership[user_ids][]']").each(function(){ + if($(this).prop('checked')){ + user_ischeck=true; + } + }); + if(user_ischeck==false){ + nh_show_err_message('请选择用户!'); + return false; + } + var role_ischeck=false; + $("input[name='membership[role_ids][]']").each(function(){ + if($(this).prop('checked')){ + role_ischeck=true; + } + }); + if(role_ischeck==false){ + nh_show_err_message('请选择角色!'); + return false; + } + }); }); \ No newline at end of file