summaryrefslogtreecommitdiffstats
path: root/templates/org/team/sidebar.tmpl
diff options
context:
space:
mode:
authorJohn Olheiser <john.olheiser@gmail.com>2020-02-27 16:00:13 -0600
committerGitHub <noreply@github.com>2020-02-27 16:00:13 -0600
commit15fbf509d3475cef3f8a7e994b59e4d78fd1c508 (patch)
tree86b8f7bca92f3d6d235b07e0962fe6443711398d /templates/org/team/sidebar.tmpl
parent90919bb37e2bcc62440e393439825fe0e1e1f343 (diff)
downloadgitea-15fbf509d3475cef3f8a7e994b59e4d78fd1c508.tar.gz
gitea-15fbf509d3475cef3f8a7e994b59e4d78fd1c508.zip
Org action fixes and form cleanup (#10512)
* More org fixes * Move form action query to inputs Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'templates/org/team/sidebar.tmpl')
-rw-r--r--templates/org/team/sidebar.tmpl10
1 files changed, 6 insertions, 4 deletions
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 @@
<strong>{{.Team.Name}}</strong>
<div class="ui right">
{{if .Team.IsMember $.SignedUser.ID}}
- <form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave?uid={{$.SignedUser.ID}}&page=home">
+ <form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave">
{{$.CsrfTokenHtml}}
- <button type="submit" class="ui red tiny button">{{$.i18n.Tr "org.teams.leave"}}</button>
+ <input type="hidden" name="page" value="home"/>
+ <button type="submit" class="ui red tiny button" name="uid" value="{{$.SignedUser.ID}}">{{$.i18n.Tr "org.teams.leave"}}</button>
</form>
{{else if .IsOrganizationOwner}}
- <form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join?uid={{$.SignedUser.ID}}&page=team">
+ <form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join">
{{$.CsrfTokenHtml}}
- <button type="submit" class="ui blue tiny button">{{$.i18n.Tr "org.teams.join"}}</button>
+ <input type="hidden" name="page" value="team"/>
+ <button type="submit" class="ui blue tiny button" name="uid" value="{{$.SignedUser.ID}}">{{$.i18n.Tr "org.teams.join"}}</button>
</form>
{{end}}
</div>