From 66686f6d0eeb24fdfe709dbc0a7d5aa67caa54f9 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 13 Jul 2022 09:47:29 +0800 Subject: [PATCH] Hide notify mail setting ui if not enabled (#20138) (#20336) Co-authored-by: 6543 <6543@obermui.de> --- routers/web/user/setting/account.go | 1 + templates/user/settings/account.tmpl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/routers/web/user/setting/account.go b/routers/web/user/setting/account.go index 3e96cc7c85..0228b5521b 100644 --- a/routers/web/user/setting/account.go +++ b/routers/web/user/setting/account.go @@ -34,6 +34,7 @@ func Account(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("settings") ctx.Data["PageIsSettingsAccount"] = true ctx.Data["Email"] = ctx.Doer.Email + ctx.Data["EnableNotifyMail"] = setting.Service.EnableNotifyMail loadAccountData(ctx) diff --git a/templates/user/settings/account.tmpl b/templates/user/settings/account.tmpl index 3662ec0fa7..1b3fd136de 100644 --- a/templates/user/settings/account.tmpl +++ b/templates/user/settings/account.tmpl @@ -43,6 +43,7 @@
+ {{end}} {{range .Emails}}
{{if not .IsPrimary}}