激活邮箱界面显示邮箱,激活邮箱界面留言太长不能留言解决
This commit is contained in:
parent
a8bd91754d
commit
8db5852a61
|
@ -239,17 +239,18 @@ class AccountController < ApplicationController
|
||||||
|
|
||||||
end
|
end
|
||||||
def resendmail
|
def resendmail
|
||||||
status = 1
|
result = {:status=>1, :email=>""}
|
||||||
user = User.find(params[:user]) if params[:user]
|
user = User.find(params[:user]) if params[:user]
|
||||||
|
result[:email] = user.mail
|
||||||
token = Token.new(:user => user, :action => "register")
|
token = Token.new(:user => user, :action => "register")
|
||||||
if token.save
|
if token.save
|
||||||
# Mailer.run.register(token)
|
# Mailer.run.register(token)
|
||||||
Mailer.register(token).deliver
|
Mailer.register(token).deliver
|
||||||
else
|
else
|
||||||
yield if block_given?
|
yield if block_given?
|
||||||
status = 0
|
result[:status] = 0
|
||||||
end
|
end
|
||||||
render :json => status
|
render :json => result
|
||||||
end
|
end
|
||||||
|
|
||||||
def email_activation
|
def email_activation
|
||||||
|
|
|
@ -23,9 +23,15 @@
|
||||||
url,
|
url,
|
||||||
{user: id },
|
{user: id },
|
||||||
function (data) {
|
function (data) {
|
||||||
console.log("1111111111");
|
//邮箱@之前用a**b格式显示
|
||||||
console.log(data);
|
var mail = data.email;
|
||||||
$(".email_verify_btn").replaceWith("<p class='email_verify_p mt30 ml30'>激活邮件已发送至您的注册邮箱,请及时登录邮箱进行验证。</p>");
|
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("<p class='email_verify_p mt30 ml30'>激活邮件已发送至您的注册邮箱("+mail+"),请及时登录邮箱进行验证。</p>");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -37,16 +43,16 @@
|
||||||
pop_up_box(htmlvalue,580,30,50);
|
pop_up_box(htmlvalue,580,30,50);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.get(
|
|
||||||
url,
|
$.ajax({
|
||||||
{user:user,text:$(".email_prompt_mes").val() },
|
url: url,
|
||||||
function (data) {
|
data: {user: user, text: $(".email_prompt_mes").val() },
|
||||||
console.log("2222222");
|
type: "POST",
|
||||||
console.log(data);
|
success: function (data) {
|
||||||
var htmlvalue = "<div class='email_tancon'><h2 class='email_tan_title'>您的留言已发送</h2><p class='email_tan_p'>我们将尽快处理好,并通过邮件通知您。感谢您的反馈!</p></div>"
|
var htmlvalue = "<div class='email_tancon'><h2 class='email_tan_title'>您的留言已发送</h2><p class='email_tan_p'>我们将尽快处理好,并通过邮件通知您。感谢您的反馈!</p></div>"
|
||||||
pop_up_box(htmlvalue,580,30,50);
|
pop_up_box(htmlvalue, 580, 30, 45);
|
||||||
$(".email_prompt_mes").val("");
|
$(".email_prompt_mes").val("");
|
||||||
}
|
}
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
var last_name = $.trim($('#last_name').val());
|
var last_name = $.trim($('#last_name').val());
|
||||||
if(last_name.length > 30)
|
if(last_name.length > 30)
|
||||||
{
|
{
|
||||||
$("#valid_email").text("用户姓氏过长,最长为30个字符");
|
$("#valid_email").text("用户姓名过长,最长为30个字符");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -496,7 +496,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post]
|
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
|
# boards
|
||||||
match 'boards/:board_id/topics/new', :to => 'messages#new', :via => [:get, :post], :as => 'new_board_message'
|
match 'boards/:board_id/topics/new', :to => 'messages#new', :via => [:get, :post], :as => 'new_board_message'
|
||||||
|
|
Loading…
Reference in New Issue