Skip to content

Commit

Permalink
Hide notify mail setting ui if not enabled (go-gitea#20138) (go-gitea…
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny authored Jul 12, 2022
1 parent 0f89417 commit 6b7e860
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions routers/web/user/setting/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 2 additions & 0 deletions templates/user/settings/account.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}
Expand All @@ -69,6 +70,7 @@
</div>
</form>
</div>
{{end}}
{{range .Emails}}
<div class="item">
{{if not .IsPrimary}}
Expand Down

0 comments on commit 6b7e860

Please sign in to comment.