Skip to content

Commit ca714db

Browse files
a1012112796lafriks
andauthored
ui:Add flash notify for email preference seting success (#11027)
* Add flash notify for email preference seting success Signed-off-by: a1012112796 <1012112796@qq.com> * add review suggest changes Co-authored-by: Lauris BH <lauris@nix.lv> Co-Authored-By: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
1 parent 0be25e2 commit ca714db

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ add_email = Add Email Address
460460
add_openid = Add OpenID URI
461461
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.
462462
add_email_success = The new email address has been added.
463+
email_preference_set_success = Email preference has been set successfully.
463464
add_openid_success = The new OpenID address has been added.
464465
keep_email_private = Hide Email Address
465466
keep_email_private_popup = Your email address will be hidden from other users.

routers/user/setting/account.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ func EmailPost(ctx *context.Context, form auth.AddEmailForm) {
149149
return
150150
}
151151
log.Trace("Email notifications preference made %s: %s", preference, ctx.User.Name)
152+
ctx.Flash.Success(ctx.Tr("settings.email_preference_set_success"))
152153
ctx.Redirect(setting.AppSubURL + "/user/settings/account")
153154
return
154155
}

0 commit comments

Comments
 (0)