From 8db5852a61b05c1bc90fb2fccf5a79e23b7db0f1 Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Fri, 1 Jul 2016 15:49:25 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E6=BF=80=E6=B4=BB=E9=82=AE=E7=AE=B1?=
=?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=98=BE=E7=A4=BA=E9=82=AE=E7=AE=B1=EF=BC=8C?=
=?UTF-8?q?=E6=BF=80=E6=B4=BB=E9=82=AE=E7=AE=B1=E7=95=8C=E9=9D=A2=E7=95=99?=
=?UTF-8?q?=E8=A8=80=E5=A4=AA=E9=95=BF=E4=B8=8D=E8=83=BD=E7=95=99=E8=A8=80?=
=?UTF-8?q?=E8=A7=A3=E5=86=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/account_controller.rb | 7 ++--
app/views/account/email_activation.html.erb | 34 +++++++++++--------
.../projects/invite_members_by_mail.html.erb | 2 +-
config/routes.rb | 2 +-
4 files changed, 26 insertions(+), 19 deletions(-)
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index 62b076754..8187055be 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -239,17 +239,18 @@ class AccountController < ApplicationController
end
def resendmail
- status = 1
+ result = {:status=>1, :email=>""}
user = User.find(params[:user]) if params[:user]
+ result[:email] = user.mail
token = Token.new(:user => user, :action => "register")
if token.save
# Mailer.run.register(token)
Mailer.register(token).deliver
else
yield if block_given?
- status = 0
+ result[:status] = 0
end
- render :json => status
+ render :json => result
end
def email_activation
diff --git a/app/views/account/email_activation.html.erb b/app/views/account/email_activation.html.erb
index d625e7fc9..9655efcf4 100644
--- a/app/views/account/email_activation.html.erb
+++ b/app/views/account/email_activation.html.erb
@@ -23,9 +23,15 @@
url,
{user: id },
function (data) {
- console.log("1111111111");
- console.log(data);
- $(".email_verify_btn").replaceWith("
激活邮件已发送至您的注册邮箱,请及时登录邮箱进行验证。
");
+ //邮箱@之前用a**b格式显示
+ var mail = data.email;
+ var pos = mail.indexOf("@");
+ var restr = mail.substring(1,pos-1);
+ if( mail.split("@")[0].length > 2 ){
+ mail = mail.replace(restr,"***");
+ }
+
+ $(".email_verify_btn").replaceWith("激活邮件已发送至您的注册邮箱("+mail+"),请及时登录邮箱进行验证。
");
}
);
}
@@ -37,16 +43,16 @@
pop_up_box(htmlvalue,580,30,50);
return;
}
- $.get(
- url,
- {user:user,text:$(".email_prompt_mes").val() },
- function (data) {
- console.log("2222222");
- console.log(data);
- var htmlvalue = "您的留言已发送
我们将尽快处理好,并通过邮件通知您。感谢您的反馈!
"
- pop_up_box(htmlvalue,580,30,50);
- $(".email_prompt_mes").val("");
- }
- );
+
+ $.ajax({
+ url: url,
+ data: {user: user, text: $(".email_prompt_mes").val() },
+ type: "POST",
+ success: function (data) {
+ var htmlvalue = "您的留言已发送
我们将尽快处理好,并通过邮件通知您。感谢您的反馈!
"
+ pop_up_box(htmlvalue, 580, 30, 45);
+ $(".email_prompt_mes").val("");
+ }
+ });
}
diff --git a/app/views/projects/invite_members_by_mail.html.erb b/app/views/projects/invite_members_by_mail.html.erb
index bced1e936..d0f46611e 100644
--- a/app/views/projects/invite_members_by_mail.html.erb
+++ b/app/views/projects/invite_members_by_mail.html.erb
@@ -48,7 +48,7 @@
var last_name = $.trim($('#last_name').val());
if(last_name.length > 30)
{
- $("#valid_email").text("用户姓氏过长,最长为30个字符");
+ $("#valid_email").text("用户姓名过长,最长为30个字符");
return false;
}
else
diff --git a/config/routes.rb b/config/routes.rb
index d56f75ced..0741b2a10 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -496,7 +496,7 @@ RedmineApp::Application.routes.draw do
match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post]
#激活邮箱反馈问题
- match 'users/:id/leave_email_activation_message', :to => 'words#leave_email_activation_message', :via => :get, :as => "leave_email_activation_message"
+ match 'users/:id/leave_email_activation_message', :to => 'words#leave_email_activation_message', :via => :post, :as => "leave_email_activation_message"
# boards
match 'boards/:board_id/topics/new', :to => 'messages#new', :via => [:get, :post], :as => 'new_board_message'
From 89e42ac77668ffaaa0beceeaba8e5b365b248ce9 Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Fri, 1 Jul 2016 16:10:48 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E5=B0=86=E5=A7=93=E6=B0=8F=E6=94=B9?=
=?UTF-8?q?=E4=B8=BA=E5=A7=93=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config/locales/my/zh.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/locales/my/zh.yml b/config/locales/my/zh.yml
index 39c7c3167..85ba156ef 100644
--- a/config/locales/my/zh.yml
+++ b/config/locales/my/zh.yml
@@ -37,7 +37,7 @@ zh:
field_firstname: 名字或组织名
firstname_empty: 名字不能为空
field_firstname_eg: '(例:张三丰,请填写[三丰])'
- field_lastname: 姓氏
+ field_lastname: 姓名
lastname_empty: 姓氏不能为空
enterprise_empty: 企业名不能为空
field_lastname_eg: '(例:张三丰,请填写[张])'
From 547d5409bb8c260708b4b7b19438c8196901b197 Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Fri, 1 Jul 2016 17:43:38 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E7=BB=84=E7=BB=87=E4=B8=AD=E7=9A=84?=
=?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=AD=97=E6=A0=B7=E6=94=B9=E4=B8=BA=E7=8F=AD?=
=?UTF-8?q?=E7=BA=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/organizations_helper.rb | 2 +-
app/views/organizations/_join_course_menu.html.erb | 6 +++---
app/views/organizations/_org_custom_left2.html.erb | 2 +-
app/views/organizations/_org_left_subfield_list.html.erb | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb
index cb06bd688..48b5f068b 100644
--- a/app/helpers/organizations_helper.rb
+++ b/app/helpers/organizations_helper.rb
@@ -23,7 +23,7 @@ module OrganizationsHelper
when 'activity' then
return '动态'
when 'course' then
- return '课程'
+ return '班级'
when 'project' then
return '项目'
end
diff --git a/app/views/organizations/_join_course_menu.html.erb b/app/views/organizations/_join_course_menu.html.erb
index b15dce2c6..9ca522e97 100644
--- a/app/views/organizations/_join_course_menu.html.erb
+++ b/app/views/organizations/_join_course_menu.html.erb
@@ -24,12 +24,12 @@
-
请选择关联到组织的课程
-
您的私有课程不能被关联到组织
+
请选择关联到组织的班级
+
您的私有班级不能被关联到组织
<%=form_tag url_for(:controller => 'organizations', :action => 'join_courses', :organization_id => organization_id),:method => 'post', :id => 'join_courses_form', :remote => true,:class=>"resourcesSearchBox" do %>
-
+
关联
diff --git a/app/views/organizations/_org_custom_left2.html.erb b/app/views/organizations/_org_custom_left2.html.erb
index 2c389766f..feedf2a44 100644
--- a/app/views/organizations/_org_custom_left2.html.erb
+++ b/app/views/organizations/_org_custom_left2.html.erb
@@ -2,7 +2,7 @@
<% if is_default_field?(field) %>
<% case field.name %>
<% when 'course' %>
-
课程动态
+
班级动态
<% if @course_acts.blank? %>
该模块暂时没有相关内容
<% else %>
diff --git a/app/views/organizations/_org_left_subfield_list.html.erb b/app/views/organizations/_org_left_subfield_list.html.erb
index ddc504640..9d043fbb5 100644
--- a/app/views/organizations/_org_left_subfield_list.html.erb
+++ b/app/views/organizations/_org_left_subfield_list.html.erb
@@ -63,9 +63,9 @@
<% when 'course' %>