ui:Add flash notify for email preference seting success (#11027)

* Add flash notify for email preference seting success

Signed-off-by: a1012112796 <[email protected]>

* add review suggest changes

Co-authored-by: Lauris BH <[email protected]>

Co-Authored-By: Lauris BH <[email protected]>

Co-authored-by: Lauris BH <[email protected]>
This commit is contained in:
赵智超
2020-04-09 13:22:17 -04:00
committed by GitHub
co-authored by GitHub Lauris BH
parent 0be25e2150
commit ca714db4fd
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -460,6 +460,7 @@ add_email = Add Email Address
add_openid = Add OpenID URI
add_email_confirmation_sent = A confirmation email has been sent to '%s'. Please check your inbox within the next %s to confirm your email address.
add_email_success = The new email address has been added.
email_preference_set_success = Email preference has been set successfully.
add_openid_success = The new OpenID address has been added.
keep_email_private = Hide Email Address
keep_email_private_popup = Your email address will be hidden from other users.
+1
View File
@@ -149,6 +149,7 @@ func EmailPost(ctx *context.Context, form auth.AddEmailForm) {
return
}
log.Trace("Email notifications preference made %s: %s", preference, ctx.User.Name)
ctx.Flash.Success(ctx.Tr("settings.email_preference_set_success"))
ctx.Redirect(setting.AppSubURL + "/user/settings/account")
return
}