Skip to content

Commit

Permalink
ui:Add flash notify for email preference seting success (#11027)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
a1012112796 and lafriks committed Apr 9, 2020
1 parent 0be25e2 commit ca714db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions routers/user/setting/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit ca714db

Please sign in to comment.