From a159af813959d9b3b7ca9d04264bdf6d7e817572 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 7 Sep 2015 15:20:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE--=E9=82=80=E8=AF=B7--?= =?UTF-8?q?=E5=8F=91=E9=80=81=E9=82=AE=E4=BB=B6=E9=82=80=E8=AF=B7=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=AF=B9=E8=BE=93=E5=85=A5=E7=9A=84=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E5=88=A4=E6=96=AD=EF=BC=8C=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projects/invite_members_by_mail.html.erb | 18 +++++++++++++----- public/stylesheets/public.css | 2 ++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/app/views/projects/invite_members_by_mail.html.erb b/app/views/projects/invite_members_by_mail.html.erb index 4c6ee47d8..8c951a485 100644 --- a/app/views/projects/invite_members_by_mail.html.erb +++ b/app/views/projects/invite_members_by_mail.html.erb @@ -24,16 +24,24 @@ if(email == "") { $("#valid_email").text("<%= l(:label_input_email_blank)%>"); + return false; } - else if (filter.test(email)) { - $("#valid_email").html(""); - return true; + else if(!filter.test(email)) + { + $("#valid_email").text("<%= l(:label_email_format_error)%>"); + return false; + } + else if(email.split('@')[0].length >= 20) + { + $("#valid_email").text("邮箱名过长,最长为20个字符"); + return false; } else { - $("#valid_email").text("<%= l(:label_email_format_error)%>"); + $("#valid_email").text(""); + return true; } - return false; + } function senderEmail(obj) diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 4cc859721..2288c4994 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -418,6 +418,8 @@ div.flash.notice { background-color: #dfffdf; border-color: #9fcf9f; color: #005f00; + word-wrap: break-word; + word-break: break-all } div.flash.warning, .conflict {