diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 92f490c519..b6c9ee4040 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -354,8 +354,8 @@ prohibit_login = Sign In Prohibited prohibit_login_desc = Your account is prohibited to sign in, please contact your site administrator. resent_limit_prompt = You have already requested an activation email recently. Please wait 3 minutes and try again. has_unconfirmed_mail = Hi %s, you have an unconfirmed email address (%s). -has_unconfirmed_mail_resend = If you did not receive the activation email, or need to resend it, please click the "Resend Confirmation Email" button below. -has_unconfirmed_mail_change=If you need to change the mailbox and then activate the mail, please click the "Modify Mailbox" button below. +has_unconfirmed_mail_resend = If you did not receive the activation email, or need to resend it, please click the "Resend your activation email" button below. +has_unconfirmed_mail_change =If you need to change your email address before sending an activation email, please click the "Change email" button below. resend_mail = Resend your activation email email_not_associate = The email address is not associated with any account. email_not_main=The email address is wrong, please input your primary email address. diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 63c7f93b3d..495063a1f2 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -358,7 +358,7 @@ prohibit_login_desc=您的帐户被禁止登录,请与网站管理员联系。 resent_limit_prompt=您请求发送激活邮件过于频繁,请等待 3 分钟后再试! has_unconfirmed_mail=%s 您好,系统检测到您有一封发送至 %s 但未被确认的邮件。 has_unconfirmed_mail_resend=如果您未收到激活邮件,或需要重新发送,请单击下方的 "重新发送确认邮件 " 按钮。 -has_unconfirmed_mail_change=如果需要更改邮箱后再激活邮件,请单击下方的 "修改邮箱" 按钮 +has_unconfirmed_mail_change=如果您需要更改邮箱后再发送激活邮件,请单击下方的 "修改邮箱" 按钮。 resend_mail=重新发送确认邮件 email_not_associate=您输入的邮箱地址未被关联到任何帐号! email_not_main=电子邮箱地址不正确,请输入您设置的主要邮箱地址。 diff --git a/routers/user/auth.go b/routers/user/auth.go index bf858706d3..3d74b6ddd1 100755 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -1435,7 +1435,7 @@ func UpdateEmailPost(ctx *context.Context, form auth.UpdateEmailForm) { ctx.ServerError("UpdateEmailAddress failed", err) return } - ctx.Data["Email"] = newEmailAddress + ctx.Data["SignedUser.Email"] = newEmailAddress ctx.User.Email = newEmailAddress Activate(ctx) diff --git a/templates/user/auth/activate.tmpl b/templates/user/auth/activate.tmpl index 8b50be45a1..7d5a501299 100644 --- a/templates/user/auth/activate.tmpl +++ b/templates/user/auth/activate.tmpl @@ -15,7 +15,7 @@ {{else if .ResendLimited}}

{{.i18n.Tr "auth.resent_limit_prompt"}}

{{else}} -

{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .ActiveCodeLives | Str2html}}

+

{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .SignedUser.Email .ActiveCodeLives | Str2html}}

{{end}} {{else}} {{if .IsSendRegisterMail}} @@ -51,12 +51,12 @@ {{$.CsrfTokenHtml}}
-
- +
{{.i18n.Tr "cancel"}}
@@ -70,6 +70,13 @@ .modal({ onShow:function(){ $('.ui.dimmer').css({ "background-color": "rgb(136, 136, 136,0.7)" }) + let emailInput=document.getElementById("email"); + emailInput.oninvalid = function () { + this.setCustomValidity('{{.i18n.Tr "auth.email_domain_blacklisted"}}') + } + emailInput.oninput = function(){ + this.setCustomValidity('') + } } }) .modal('show')