Skip to content

Commit 2a69304

Browse files
use the link-action approach for deletion
1 parent ebc487b commit 2a69304

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

models/migrations/v1_25/v321.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2025 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_25 //nolint
4+
package v1_25
55

66
import (
77
"fmt"

templates/admin/badge/users.tmpl

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
</div>
1818
</div>
1919
<div class="flex-item-trailing">
20-
<button class="ui red tiny button inline delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
20+
<a class="ui red tiny button inline link-action" data-url="{{$.Link}}/delete?id={{.ID}}" data-modal-confirm="{{ctx.Locale.Tr "admin.badges.delete_user_desc"}}">
2121
{{ctx.Locale.Tr "admin.badges.remove_user"}}
22-
</button>
22+
</a>
2323
</div>
2424
</div>
2525
{{end}}
@@ -38,18 +38,4 @@
3838
</div>
3939
</div>
4040

41-
<div class="ui g-modal-confirm delete modal">
42-
<div class="header">
43-
{{svg "octicon-trash"}}
44-
{{ctx.Locale.Tr "admin.badges.remove_user"}}
45-
</div>
46-
<form class="ui form" method="post" id="remove-badge-user-form" action="{{.Link}}">
47-
<div class="content">
48-
{{$.CsrfTokenHtml}}
49-
<p>{{ctx.Locale.Tr "admin.badges.delete_user_desc"}}</p>
50-
</div>
51-
{{template "base/modal_actions_confirm" .}}
52-
</form>
53-
</div>
54-
5541
{{template "admin/layout_footer" .}}

0 commit comments

Comments
 (0)