From 15fbf509d3475cef3f8a7e994b59e4d78fd1c508 Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Thu, 27 Feb 2020 16:00:13 -0600 Subject: [PATCH] Org action fixes and form cleanup (#10512) * 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 15af60d573..1a65a02278 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -54,9 +54,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 f3b08652cd..ef595f841a 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 d6046f86a3..e3c52e1615 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 ff2474f007..d3bd082875 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 a042ef6112..6aef18dfff 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 e746400a8f..00b73f94d9 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}} + +