diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 512d91393e..a2211fc1be 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -2872,7 +2872,6 @@ teams.all_repositories = All repositories
teams.all_repositories_helper = Team has access to all repositories. Selecting this will add all existing repositories to the team.
teams.invite.title = You have been invited to join team %s in organization %s.
teams.invite.by = Invited by %s
-teams.invite.description = Please click the button below to join the team.
[admin]
dashboard = Dashboard
diff --git a/templates/org/team/invite.tmpl b/templates/org/team/invite.tmpl
index 14a97ae659..749f99968a 100644
--- a/templates/org/team/invite.tmpl
+++ b/templates/org/team/invite.tmpl
@@ -2,20 +2,17 @@
{{template "base/alert" .}}
-
-
- {{ctx.AvatarUtils.Avatar .Organization 140}}
-
-
-
-
{{ctx.Locale.Tr "org.teams.invite.by" .Inviter.Name}}
-
{{ctx.Locale.Tr "org.teams.invite.description"}}
-
-
+
+
+ {{ctx.AvatarUtils.Avatar .Organization 140}}
+ {{ctx.Locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name}}
+
+
+
{{ctx.Locale.Tr "org.teams.invite.by" .Inviter.Name}}
+
+
diff --git a/tests/integration/org_team_invite_test.go b/tests/integration/org_team_invite_test.go
index ab2962b5d0..b36d1acb71 100644
--- a/tests/integration/org_team_invite_test.go
+++ b/tests/integration/org_team_invite_test.go
@@ -57,8 +57,17 @@ func TestOrgTeamEmailInvite(t *testing.T) {
session = loginUser(t, user.Name)
- // join the team
+ // get the invite page
inviteURL := fmt.Sprintf("/org/invite/%s", invites[0].Token)
+ req = NewRequest(t, "GET", inviteURL)
+ resp = session.MakeRequest(t, req, http.StatusOK)
+ doc := NewHTMLParser(t, resp.Body)
+
+ // check the button exists
+ submitButton := doc.Find(`button:contains('Join')`).Length()
+ assert.Equal(t, 1, submitButton)
+
+ // join the team
req = NewRequest(t, "POST", inviteURL)
resp = session.MakeRequest(t, req, http.StatusSeeOther)
req = NewRequest(t, "GET", test.RedirectURL(resp))
diff --git a/web_src/css/org.css b/web_src/css/org.css
index 1ea22dcdbb..3653afe912 100644
--- a/web_src/css/org.css
+++ b/web_src/css/org.css
@@ -155,24 +155,22 @@
margin-bottom: 5px;
}
-.organization.invite #invite-box {
- margin: 50px auto auto;
- width: 500px !important;
+.organization.invite .invite-content {
+ max-width: 420px;
+ margin-inline: auto;
+ margin-block: 3rem;
+ text-align: center;
}
-
-.organization.invite #invite-box #search-user-box input {
- margin-inline-start: 0;
- width: 300px;
+.organization.invite .invite-content :is(h2, p) {
+ text-wrap: balance;
+ overflow-wrap: break-word;
}
-
-.organization.invite #invite-box .ui.button {
- margin-inline-start: 5px;
- margin-top: -3px;
+.organization.invite .invite-content h2 {
+ margin-block-end: 1rem;
+ font-size: 1.3rem;
}
-
-.organization.invite .ui.avatar {
- width: 100%;
- height: 100%;
+.organization.invite h2 :is(b, strong) {
+ font-weight: var(--font-weight-bold);
}
.organization.teams .detail .item {