Reviewed-on: https://openi.pcl.ac.cn/OpenI/aiforge/pulls/3295 Reviewed-by: liuzx <liuzx@pcl.ac.cn>tags/v1.22.11.3^2
| @@ -354,8 +354,8 @@ prohibit_login = Sign In Prohibited | |||||
| prohibit_login_desc = Your account is prohibited to sign in, please contact your site administrator. | 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. | 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 (<b>%s</b>). | has_unconfirmed_mail = Hi %s, you have an unconfirmed email address (<b>%s</b>). | ||||
| 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 | resend_mail = Resend your activation email | ||||
| email_not_associate = The email address is not associated with any account. | 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. | email_not_main=The email address is wrong, please input your primary email address. | ||||
| @@ -358,7 +358,7 @@ prohibit_login_desc=您的帐户被禁止登录,请与网站管理员联系。 | |||||
| resent_limit_prompt=您请求发送激活邮件过于频繁,请等待 3 分钟后再试! | resent_limit_prompt=您请求发送激活邮件过于频繁,请等待 3 分钟后再试! | ||||
| has_unconfirmed_mail=%s 您好,系统检测到您有一封发送至 <b>%s</b> 但未被确认的邮件。 | has_unconfirmed_mail=%s 您好,系统检测到您有一封发送至 <b>%s</b> 但未被确认的邮件。 | ||||
| has_unconfirmed_mail_resend=如果您未收到激活邮件,或需要重新发送,请单击下方的 "重新发送确认邮件 " 按钮。 | has_unconfirmed_mail_resend=如果您未收到激活邮件,或需要重新发送,请单击下方的 "重新发送确认邮件 " 按钮。 | ||||
| has_unconfirmed_mail_change=如果需要更改邮箱后再激活邮件,请单击下方的 "修改邮箱" 按钮 | |||||
| has_unconfirmed_mail_change=如果您需要更改邮箱后再发送激活邮件,请单击下方的 "修改邮箱" 按钮。 | |||||
| resend_mail=重新发送确认邮件 | resend_mail=重新发送确认邮件 | ||||
| email_not_associate=您输入的邮箱地址未被关联到任何帐号! | email_not_associate=您输入的邮箱地址未被关联到任何帐号! | ||||
| email_not_main=电子邮箱地址不正确,请输入您设置的主要邮箱地址。 | email_not_main=电子邮箱地址不正确,请输入您设置的主要邮箱地址。 | ||||
| @@ -1435,7 +1435,7 @@ func UpdateEmailPost(ctx *context.Context, form auth.UpdateEmailForm) { | |||||
| ctx.ServerError("UpdateEmailAddress failed", err) | ctx.ServerError("UpdateEmailAddress failed", err) | ||||
| return | return | ||||
| } | } | ||||
| ctx.Data["Email"] = newEmailAddress | |||||
| ctx.Data["SignedUser.Email"] = newEmailAddress | |||||
| ctx.User.Email = newEmailAddress | ctx.User.Email = newEmailAddress | ||||
| Activate(ctx) | Activate(ctx) | ||||
| @@ -15,7 +15,7 @@ | |||||
| {{else if .ResendLimited}} | {{else if .ResendLimited}} | ||||
| <p class="center">{{.i18n.Tr "auth.resent_limit_prompt"}}</p> | <p class="center">{{.i18n.Tr "auth.resent_limit_prompt"}}</p> | ||||
| {{else}} | {{else}} | ||||
| <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .ActiveCodeLives | Str2html}}</p> | |||||
| <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .SignedUser.Email .ActiveCodeLives | Str2html}}</p> | |||||
| {{end}} | {{end}} | ||||
| {{else}} | {{else}} | ||||
| {{if .IsSendRegisterMail}} | {{if .IsSendRegisterMail}} | ||||
| @@ -51,12 +51,12 @@ | |||||
| {{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
| <div class="inline required field"> | <div class="inline required field"> | ||||
| <label>{{.i18n.Tr "auth.new_email_address"}}</label> | <label>{{.i18n.Tr "auth.new_email_address"}}</label> | ||||
| <input type="email" style="width: 80%;" id="label" name="NewEmail" maxlength="255" value="{{.SignedUser.Email}}" | |||||
| <input type="email" style="width: 80%;" id="email" name="NewEmail" maxlength="255" value="{{.SignedUser.Email}}" | |||||
| pattern="([a-zA-Z0-9_-])+@(163\.com|126\.com|qq\.com|yahoo\.com|sina\.com|sina\.cn|outlook\.com|pcl\.ac\.cn|foxmail\.com|ict\.ac\.cn|21cn\.com|yeah\.net|139\.com)"> | pattern="([a-zA-Z0-9_-])+@(163\.com|126\.com|qq\.com|yahoo\.com|sina\.com|sina\.cn|outlook\.com|pcl\.ac\.cn|foxmail\.com|ict\.ac\.cn|21cn\.com|yeah\.net|139\.com)"> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="center actions"> | <div class="center actions"> | ||||
| <button class="ui green button">{{.i18n.Tr "repo.confirm_choice"}}</button> | |||||
| <button id="submitBtn" class="ui green button">{{.i18n.Tr "repo.confirm_choice"}}</button> | |||||
| <div class="ui deny button">{{.i18n.Tr "cancel"}}</div> | <div class="ui deny button">{{.i18n.Tr "cancel"}}</div> | ||||
| </div> | </div> | ||||
| </form> | </form> | ||||
| @@ -70,6 +70,13 @@ | |||||
| .modal({ | .modal({ | ||||
| onShow:function(){ | onShow:function(){ | ||||
| $('.ui.dimmer').css({ "background-color": "rgb(136, 136, 136,0.7)" }) | $('.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') | .modal('show') | ||||