diff options
author | Lunny Xiao | 2022-07-13 01:13:31 +0800 |
---|---|---|
committer | GitHub | 2022-07-12 18:13:31 +0100 |
commit | 6b7e860b0fe29421a776caf917492364d8d53d89 (patch) | |
tree | 44099ecbb3e060bed745e59fcfc3f73ff7319069 | |
parent | 0f89417d7518c44ae9dbb79e81c6db82ecb3c3bc (diff) |
Hide notify mail setting ui if not enabled (#20138) (#20337)
Backport #20138
-rw-r--r-- | routers/web/user/setting/account.go | 1 | ||||
-rw-r--r-- | templates/user/settings/account.tmpl | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/routers/web/user/setting/account.go b/routers/web/user/setting/account.go index e29cb91f4..92290c22d 100644 --- a/routers/web/user/setting/account.go +++ b/routers/web/user/setting/account.go @@ -35,6 +35,7 @@ func Account(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("settings") ctx.Data["PageIsSettingsAccount"] = true ctx.Data["Email"] = ctx.User.Email + ctx.Data["EnableNotifyMail"] = setting.Service.EnableNotifyMail loadAccountData(ctx) diff --git a/templates/user/settings/account.tmpl b/templates/user/settings/account.tmpl index 3753a77ce..9245b4c59 100644 --- a/templates/user/settings/account.tmpl +++ b/templates/user/settings/account.tmpl @@ -43,6 +43,7 @@ </h4> <div class="ui attached segment"> <div class="ui email list"> + {{if $.EnableNotifyMail}} <div class="item"> <form action="{{AppSubUrl}}/user/settings/account/email" class="ui form" method="post"> {{.i18n.Tr "settings.email_desc"}} @@ -69,6 +70,7 @@ </div> </form> </div> + {{end}} {{range .Emails}} <div class="item"> {{if not .IsPrimary}} |