aboutsummaryrefslogtreecommitdiffstats
path: root/templates/org/team/sidebar.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/org/team/sidebar.tmpl')
-rw-r--r--templates/org/team/sidebar.tmpl18
1 files changed, 14 insertions, 4 deletions
diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl
index 9ab6e8f4cd..84729a0841 100644
--- a/templates/org/team/sidebar.tmpl
+++ b/templates/org/team/sidebar.tmpl
@@ -3,10 +3,10 @@
<strong>{{.Team.Name}}</strong>
<div class="ui right">
{{if .Team.IsMember $.SignedUser.ID}}
- <form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave">
- {{$.CsrfTokenHtml}}
- <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>
+ <button class="ui red tiny button delete-button" data-modal-id="leave-team-sidebar"
+ data-url="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave" data-datauid="{{$.SignedUser.ID}}"
+ data-name="{{.Team.Name}}">{{$.i18n.Tr "org.teams.leave"}}</button>
</form>
{{else if .IsOrganizationOwner}}
<form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join">
@@ -59,3 +59,13 @@
</div>
{{end}}
</div>
+<div class="ui small basic delete modal" id="leave-team-sidebar">
+ <div class="ui icon header">
+ {{svg "octicon-x" 16 "close inside"}}
+ {{$.i18n.Tr "org.teams.leave"}}
+ </div>
+ <div class="content">
+ <p>{{$.i18n.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
+ </div>
+ {{template "base/delete_modal_actions" .}}
+</div>