diff options
author | zeripath <art27@cantab.net> | 2023-01-15 23:29:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-16 01:29:27 +0200 |
commit | f430050d244f8bbefc0726b786d49b70bf6a8234 (patch) | |
tree | aa459cc071a21454899550fa9d827e0e5a0bee20 /templates | |
parent | 510c811574f035470ef0acf455e015e76a716f58 (diff) | |
download | gitea-f430050d244f8bbefc0726b786d49b70bf6a8234.tar.gz gitea-f430050d244f8bbefc0726b786d49b70bf6a8234.zip |
Fix leaving organization bug on user settings -> orgs (#21983) (#22438)
Backport #21983
Fix #21772
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: 花墨 <shanee@live.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/settings/organization.tmpl | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/templates/user/settings/organization.tmpl b/templates/user/settings/organization.tmpl index e25d5e7fa6..703ac8ad8e 100644 --- a/templates/user/settings/organization.tmpl +++ b/templates/user/settings/organization.tmpl @@ -17,9 +17,13 @@ {{range .Orgs}} <div class="item"> <div class="right floated content"> - <form method="post" action="{{.OrganisationLink}}/members/action/leave"> + <form> {{$.CsrfTokenHtml}} - <button type="submit" class="ui primary small button" name="uid" value="{{.ID}}">{{$.locale.Tr "org.members.leave"}}</button> + <button class="ui red button delete-button" data-modal-id="leave-organization" + data-url="{{.OrganisationLink}}/members/action/leave" data-datauid="{{$.SignedUser.ID}}" + data-name="{{$.SignedUser.DisplayName}}" + data-data-organization-name="{{.DisplayName}}">{{$.locale.Tr "org.members.leave"}} + </button> </form> </div> {{avatar . 28 "mini"}} @@ -36,4 +40,14 @@ </div> </div> </div> +<div class="ui small basic delete modal" id="leave-organization"> + <div class="ui icon header"> + {{svg "octicon-x" 16 "close inside"}} + {{$.locale.Tr "org.members.leave"}} + </div> + <div class="content"> + <p>{{$.locale.Tr "org.members.leave.detail" `<span class="dataOrganizationName"></span>` | Safe}}</p> + </div> + {{template "base/delete_modal_actions" .}} +</div> {{template "base/footer" .}} |