aboutsummaryrefslogtreecommitdiffstats
path: root/templates/admin
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2022-07-14 08:22:09 +0100
committerGitHub <noreply@github.com>2022-07-14 08:22:09 +0100
commitbffa30302070b594a1c40cdc56264b9731036fb3 (patch)
tree92104ff6b8a51f5d1506742427dd1399fa42428c /templates/admin
parent175705356cac06c22d13d86b31605a6ad6dd9642 (diff)
downloadgitea-bffa30302070b594a1c40cdc56264b9731036fb3.tar.gz
gitea-bffa30302070b594a1c40cdc56264b9731036fb3.zip
Add option to purge users (#18064)
Add the ability to purge users when deleting them. Close #15588 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'templates/admin')
-rw-r--r--templates/admin/user/edit.tmpl17
1 files changed, 14 insertions, 3 deletions
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl
index 29dcaa127a..17cbef9f10 100644
--- a/templates/admin/user/edit.tmpl
+++ b/templates/admin/user/edit.tmpl
@@ -151,7 +151,7 @@
<div class="field">
<button class="ui green button">{{.locale.Tr "admin.users.update_profile"}}</button>
- <div class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.User.ID}}">{{.locale.Tr "admin.users.delete_account"}}</div>
+ <div class="ui red button show-modal" data-modal="#delete-user-modal" data-url="{{$.Link}}/delete" data-id="{{.User.ID}}">{{.locale.Tr "admin.users.delete_account"}}</div>
</div>
</form>
</div>
@@ -196,7 +196,7 @@
</div>
</div>
-<div class="ui small basic delete modal">
+<div class="ui small basic delete modal" id="delete-user-modal">
<div class="ui icon header">
{{svg "octicon-trash"}}
{{.locale.Tr "settings.delete_account_title"}}
@@ -204,6 +204,17 @@
<div class="content">
<p>{{.locale.Tr "settings.delete_account_desc"}}</p>
</div>
- {{template "base/delete_modal_actions" .}}
+ <form class="ui form" method="POST" action="{{.Link}}/delete">
+ {{$.CsrfTokenHtml}}
+ <input type="hidden" name="id">
+ <div class="field">
+ <div class="ui checkbox">
+ <label for="purge">{{.locale.Tr "admin.users.purge"}}</label>
+ <input name="purge" type="checkbox">
+ </div>
+ <p class="help">{{.locale.Tr "admin.users.purge_help"}}</p>
+ </div>
+ {{template "base/delete_modal_actions" .}}
+ </form>
</div>
{{template "base/footer" .}}