diff options
author | Lunny Xiao | 2021-12-26 22:57:00 +0800 |
---|---|---|
committer | GitHub | 2021-12-26 22:57:00 +0800 |
commit | a17fce31a916d206557114144ef81a2ab7c7ecc8 (patch) | |
tree | 8b22acff9b173be21ed6f3224c066a2ea72406f4 | |
parent | 71e1ebfa60c27706656b44133a4c04e929bddc8d (diff) |
Revert "Fix delete u2f keys bug (#18042)" (#18107)
This reverts commit 91f5be889af4081b05d63aadecb1373689e1f57c.
-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 b33c9ae0e..dcc56d872 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" modal-id="delete-registration" data-url="{{$.Link}}/u2f/delete" data-id="{{.ID}}"> + <button class="ui red tiny button delete-button" 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 0a0cb1293..1b096a31d 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('modal-id')) { - filter += `#${$this.attr('modal-id')}`; + if ($this.attr('id')) { + filter += `#${$this.attr('id')}`; } const dialog = $(`.delete.modal${filter}`); |