forgejo/templates/org/team/invite.tmpl
Jack Hay 402df1d6b4
Prevent a user with a different email from accepting the team invite (#24491)
## Changes
- Fixes the case where a logged in user can accept an email invitation
even if their email address does not match the address in the invitation
2023-05-03 21:21:58 -04:00

29 lines
1 KiB
Handlebars

{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content organization invite">
<div class="ui container">
{{template "base/alert" .}}
<div class="ui centered card">
<div class="image">
{{avatar $.Context .Organization 140}}
</div>
{{if .EmailMismatch}}
<div class="content">
<div class="header">{{.locale.Tr "org.teams.invite.email_mismatch"}}</div>
</div>
{{else}}
<div class="content">
<div class="header">{{.locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name | Str2html}}</div>
<div class="meta">{{.locale.Tr "org.teams.invite.by" .Inviter.Name}}</div>
<div class="description">{{.locale.Tr "org.teams.invite.description"}}</div>
</div>
<div class="extra content">
<form class="ui form" action="" method="post">
{{.CsrfTokenHtml}}
<button class="fluid ui green button">{{.locale.Tr "org.teams.join"}}</button>
</form>
</div>
{{end}}
</div>
</div>
</div>
{{template "base/footer" .}}