|
54 | 54 | <div class="ui four wide column">
|
55 | 55 | <div class="text right">
|
56 | 56 | {{if eq $.SignedUser.ID .ID}}
|
57 |
| - <form method="post" action="{{$.OrgLink}}/members/action/leave"> |
58 |
| - {{$.CsrfTokenHtml}} |
59 |
| - <button type="submit" class="ui red small button" name="uid" value="{{.ID}}">{{$.i18n.Tr "org.members.leave"}}</button> |
| 57 | + <form> |
| 58 | + <button class="ui red small button delete-button" data-modal-id="leave-organization" |
| 59 | + data-url="{{$.OrgLink}}/members/action/leave" data-datauid="{{.ID}}" |
| 60 | + data-name="{{.DisplayName}}" |
| 61 | + data-data-organization-name="{{$.Org.DisplayName}}">{{$.i18n.Tr "org.members.leave"}}</button> |
60 | 62 | </form>
|
61 | 63 | {{else if $.IsOrganizationOwner}}
|
62 |
| - <form method="post" action="{{$.OrgLink}}/members/action/remove"> |
63 |
| - {{$.CsrfTokenHtml}} |
64 |
| - <button type="submit" class="ui red small button" name="uid" value="{{.ID}}">{{$.i18n.Tr "org.members.remove"}}</button> |
| 64 | + <form> |
| 65 | + <button class="ui red small button delete-button" data-modal-id="remove-organization-member" |
| 66 | + data-url="{{$.OrgLink}}/members/action/remove" data-datauid="{{.ID}}" |
| 67 | + data-name="{{.DisplayName}}" |
| 68 | + data-data-organization-name="{{$.Org.DisplayName}}">{{$.i18n.Tr "org.members.remove"}}</button> |
65 | 69 | </form>
|
66 | 70 | {{end}}
|
67 | 71 | </div>
|
|
73 | 77 | {{template "base/paginate" .}}
|
74 | 78 | </div>
|
75 | 79 | </div>
|
| 80 | +<div class="ui small basic delete modal" id="leave-organization"> |
| 81 | + <div class="ui icon header"> |
| 82 | + {{svg "octicon-x" 16 "close inside"}} |
| 83 | + {{$.i18n.Tr "org.members.leave"}} |
| 84 | + </div> |
| 85 | + <div class="content"> |
| 86 | + <p>{{$.i18n.Tr "org.members.leave.detail" `<span class="dataOrganizationName"></span>` | Safe}}</p> |
| 87 | + </div> |
| 88 | + {{template "base/delete_modal_actions" .}} |
| 89 | +</div> |
| 90 | +<div class="ui small basic delete modal" id="remove-organization-member"> |
| 91 | + <div class="ui icon header"> |
| 92 | + {{svg "octicon-x" 16 "close inside"}} |
| 93 | + {{$.i18n.Tr "org.members.remove"}} |
| 94 | + </div> |
| 95 | + <div class="content"> |
| 96 | + <p>{{$.i18n.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataOrganizationName"></span>` | Safe}}</p> |
| 97 | + </div> |
| 98 | + {{template "base/delete_modal_actions" .}} |
| 99 | +</div> |
| 100 | + |
76 | 101 | {{template "base/footer" .}}
|
0 commit comments