添加《重新发送激活邮件》功能to注册模块
Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
parent
c560ca617b
commit
f9a86356ad
|
@ -202,7 +202,16 @@ class AccountController < ApplicationController
|
|||
def email_valid
|
||||
|
||||
end
|
||||
def resendmail
|
||||
user = User.find(params[:user]) if params[:user]
|
||||
token = Token.new(:user => user, :action => "register")
|
||||
if token.save
|
||||
Mailer.register(token).deliver
|
||||
|
||||
else
|
||||
yield if block_given?
|
||||
end
|
||||
end
|
||||
private
|
||||
|
||||
def authenticate_user
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>注册帐号</title>
|
||||
<style type="text/css">
|
||||
#jihuo {
|
||||
background-image: url("./images/jingtanhao.JPG");
|
||||
background-image: url("/images/jingtanhao.JPG");
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
@ -32,7 +32,9 @@
|
|||
|
||||
border: none;
|
||||
padding: 10px 16px;
|
||||
line-height: 1.33;" target="_blank">立即查收邮件</a></p>
|
||||
line-height: 1.33;" target="_blank">立即查收邮件</a>
|
||||
<%= link_to l(:label_mail_resend), { :controller => 'account', :action => 'resendmail',:user => @user}, :remote => true, :method => 'get' %>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1609,6 +1609,7 @@ zh:
|
|||
label_tags_user_mail: 用户邮箱:
|
||||
label_tags_user_name: 用户名:
|
||||
label_tags_numbers: Tag统计:
|
||||
label_mail_resend: 重新发送激活邮件
|
||||
label_max_number: 登录名是在网站中显示的您的公开标识,只能为英文和数字。
|
||||
label_mail_attention: qq邮箱可能收不到此邮件,其他邮箱如果没有收到可能在垃圾邮件中,
|
||||
label_mail_attention1: 其中gmail与教育网邮箱的激活邮件有时比较慢,请耐心等待。
|
||||
|
|
|
@ -207,8 +207,8 @@ RedmineApp::Application.routes.draw do
|
|||
match 'account/lost_password', :via => [:get, :post], :as => 'lost_password'
|
||||
match 'account/activate', :via => :get
|
||||
match 'account/valid_ajax', :via => :get
|
||||
get 'account/email_valid', :to => 'account#email_valid'
|
||||
|
||||
match 'account/email_valid', :to => 'account#email_valid', :via => :get
|
||||
match 'account/resendmail', :to => 'account#resendmail', :via=> :get
|
||||
match 'projects/:id/wiki', :to => 'wikis#edit', :via => :post
|
||||
match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post]
|
||||
|
||||
|
|
Loading…
Reference in New Issue