Hide notify mail setting ui if not enabled (#20138) (#20336)

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Lunny Xiao 2022-07-13 09:47:29 +08:00 committed by GitHub
parent 26f4fe2b44
commit 66686f6d0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -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)

View file

@ -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}}