diff --git a/app/views/projects/invite_members_by_mail.html.erb b/app/views/projects/invite_members_by_mail.html.erb
index a697b70a4..32a124078 100644
--- a/app/views/projects/invite_members_by_mail.html.erb
+++ b/app/views/projects/invite_members_by_mail.html.erb
@@ -44,11 +44,11 @@
}
- function verifyFirstName() {
- var first_name = $.trim($('#first_name').val());
- if(first_name.length > 30)
+ function verifyLastName() {
+ var last_name = $.trim($('#last_name').val());
+ if(last_name.length > 30)
{
- $("#valid_email").text("用户名字过长,最长为30个字符");
+ $("#valid_email").text("用户姓氏过长,最长为30个字符");
return false;
}
else
@@ -59,11 +59,11 @@
}
- function verifyLastName() {
- var last_name = $.trim($('#last_name').val());
- if(last_name.length > 30)
+ function verifyFirstName() {
+ var first_name = $.trim($('#first_name').val());
+ if(first_name.length > 30)
{
- $("#valid_email").text("用户姓氏过长,最长为30个字符");
+ $("#valid_email").text("用户名字过长,最长为30个字符");
return false;
}
else
@@ -76,7 +76,7 @@
function senderEmail(obj)
{
- if(verifyAddress())
+ if(verifyAddress() && verifyFirstName() && verifyLastName() )
{
obj.parent().submit();
}
@@ -110,13 +110,13 @@
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyAddress(this);" %>
- <%= text_field_tag 'first_name', '', :class => "fb_item_first_name fl", :placeholder => l(:label_input_email_lastname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyLastName(this);" %>
+ <%= text_field_tag 'last_name', '', :class => "fb_item_first_name fl", :placeholder => l(:label_input_email_lastname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyLastName(this);" %>
- <%= text_field_tag 'last_name', '', :class => "fb_item_last_name fl", :placeholder => l(:label_input_email_firstname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyFirstName(this);" %>
+ <%= text_field_tag 'first_name', '', :class => "fb_item_last_name fl", :placeholder => l(:label_input_email_firstname), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyFirstName(this);" %>
-
+
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 195526712..5efe4a2cc 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -2025,8 +2025,8 @@ zh:
label_end_time: 截止时间
label_send_email: 确定发送
label_input_email: 请输入邮箱地址(必填)
- label_input_email_firstname: 请输入用户名字(非必填)
- label_input_email_lastname: 请输入用户姓氏(非必填)
+ label_input_email_firstname: 请输入用户名字(可选)
+ label_input_email_lastname: 请输入用户姓氏(可选)
label_input_email_gender: 请输入用户性别
#api end
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index 0a78b399b..e044f9d51 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -47,7 +47,7 @@ a:hover.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:200px;}
.fb_item_first_name{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:150px;margin-left: 10px;}
.fb_item_last_name{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:150px;margin-left: 10px;}
-.fb_item_gender{ color:#919191; border:1px solid #919191; height:29px; margin-bottom:5px; padding-left:5px; width:48px;margin-left: 10px;}
+.fb_item_gender{ color:#919191; border:1px solid #919191; height:29px; margin-bottom:5px; padding-left:5px; width:58px;margin-left: 10px;}
a.icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;}
a:hover.icon_addm{background:url(../images/img_floatbox.png) 0 -61px no-repeat; }
a.icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px}