From c6b78c3d31ea7d48c8feb04af516baef51550067 Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Thu, 27 Feb 2020 19:38:21 -0600 Subject: [PATCH] Org action fixes and form cleanup (#10512) (#10514) * More org fixes * Move form action query to inputs Signed-off-by: jolheiser --- templates/org/member/members.tmpl | 10 ++++++++-- templates/org/team/members.tmpl | 4 ++-- templates/org/team/repositories.tmpl | 4 ++-- templates/org/team/sidebar.tmpl | 10 ++++++---- templates/org/team/teams.tmpl | 8 ++++---- templates/user/settings/organization.tmpl | 5 ++++- 6 files changed, 26 insertions(+), 15 deletions(-) diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl index 22ae87b1d..1691f9b38 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -48,9 +48,15 @@
{{if eq $.SignedUser.ID .ID}} - {{$.i18n.Tr "org.members.leave"}} +
+ {{$.CsrfTokenHtml}} + +
{{else if $.IsOrganizationOwner}} - {{$.i18n.Tr "org.members.remove"}} +
+ {{$.CsrfTokenHtml}} + +
{{end}}
diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index f3b08652c..ef595f841 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -27,9 +27,9 @@ {{range .Team.Members}}
{{if $.IsOrganizationOwner}} -
+ {{$.CsrfTokenHtml}} - +
{{end}} diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index 50b3f2cff..4b79c1bf8 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -35,9 +35,9 @@ {{range .Team.Repos}}
{{if $canAddRemove}} -
+ {{$.CsrfTokenHtml}} - +
{{end}}
diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl index 531990a98..044bda941 100644 --- a/templates/org/team/sidebar.tmpl +++ b/templates/org/team/sidebar.tmpl @@ -3,14 +3,16 @@ {{.Team.Name}}
{{if .Team.IsMember $.SignedUser.ID}} -
+ {{$.CsrfTokenHtml}} - + +
{{else if .IsOrganizationOwner}} -
+ {{$.CsrfTokenHtml}} - + +
{{end}}
diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index af1fd2a5d..9de48e7e2 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -17,14 +17,14 @@
{{.Name}}
{{if .IsMember $.SignedUser.ID}} -
+ {{$.CsrfTokenHtml}} - +
{{else if $.IsOrganizationOwner}} -
+ {{$.CsrfTokenHtml}} - +
{{end}}
diff --git a/templates/user/settings/organization.tmpl b/templates/user/settings/organization.tmpl index e746400a8..00b73f94d 100644 --- a/templates/user/settings/organization.tmpl +++ b/templates/user/settings/organization.tmpl @@ -17,7 +17,10 @@ {{range .Orgs}}
- {{$.i18n.Tr "org.members.leave"}} +
+ {{$.CsrfTokenHtml}} + +