diff options
author | John Olheiser <john.olheiser@gmail.com> | 2022-09-12 15:52:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-12 21:52:17 +0100 |
commit | 2854031d870434f4a9f7e5131846eb6a7209ca59 (patch) | |
tree | d9c5e25279b091147710b3c10b39c0b2fda46a56 /templates | |
parent | defc401b275ae5cbcb983a6685e083e71da9e341 (diff) | |
download | gitea-2854031d870434f4a9f7e5131846eb6a7209ca59.tar.gz gitea-2854031d870434f4a9f7e5131846eb6a7209ca59.zip |
Use form for admin purge user (#21070)
Fixes #20998
The basic modal actions were set up for basic confirmation-style modals,
however this modal also has a special form input, which instead requires
a form in the modal itself.
The basic modal actions are indirectly controlled by JS and are simple
`<div>` elements, whereas this requires a `<button>` to submit.
This appears to be similar to how we do it in (for example) the repo
deletion modal.
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/user/edit.tmpl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index 7aeaa2537c..9e0f1d89fd 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 show-modal" data-modal="#delete-user-modal" 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">{{.locale.Tr "admin.users.delete_account"}}</div> </div> </form> </div> @@ -206,7 +206,6 @@ </div> <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> @@ -214,7 +213,16 @@ </div> <p class="help">{{.locale.Tr "admin.users.purge_help"}}</p> </div> - {{template "base/delete_modal_actions" .}} + <div class="actions"> + <div class="ui red basic inverted cancel button"> + {{svg "octicon-x"}} + {{.locale.Tr "modal.no"}} + </div> + <button class="ui green basic inverted ok button"> + {{svg "octicon-check"}} + {{.locale.Tr "modal.yes"}} + </button> + </div> </form> </div> {{template "base/footer" .}} |