diff options
author | Lunny Xiao | 2021-12-21 04:53:25 +0800 |
---|---|---|
committer | GitHub | 2021-12-20 15:53:25 -0500 |
commit | 91f5be889af4081b05d63aadecb1373689e1f57c (patch) | |
tree | a7ab5a1c752fb3fb236d11ba5fa674d813c63ec0 | |
parent | a818a48c76e4dcf0bf1e071623e05ff272869b67 (diff) |
Fix delete u2f keys bug (#18042)
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
-rw-r--r-- | templates/user/settings/security_u2f.tmpl | 2 | ||||
-rw-r--r-- | web_src/js/index.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/templates/user/settings/security_u2f.tmpl b/templates/user/settings/security_u2f.tmpl index dcc56d872..b33c9ae0e 100644 --- a/templates/user/settings/security_u2f.tmpl +++ b/templates/user/settings/security_u2f.tmpl @@ -8,7 +8,7 @@ {{range .U2FRegistrations}} <div class="item"> <div class="right floated content"> - <button class="ui red tiny button delete-button" id="delete-registration" data-url="{{$.Link}}/u2f/delete" data-id="{{.ID}}"> + <button class="ui red tiny button delete-button" modal-id="delete-registration" data-url="{{$.Link}}/u2f/delete" data-id="{{.ID}}"> {{$.i18n.Tr "settings.delete_key"}} </button> </div> diff --git a/web_src/js/index.js b/web_src/js/index.js index 1b096a31d..0a0cb1293 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -2959,8 +2959,8 @@ $(() => { function showDeletePopup() { const $this = $(this); let filter = ''; - if ($this.attr('id')) { - filter += `#${$this.attr('id')}`; + if ($this.attr('modal-id')) { + filter += `#${$this.attr('modal-id')}`; } const dialog = $(`.delete.modal${filter}`); |