Revert "Fix delete u2f keys bug (#18042)" (#18107)

This reverts commit 91f5be889a.
This commit is contained in:
Lunny Xiao 2021-12-26 22:57:00 +08:00 committed by GitHub
parent 71e1ebfa60
commit a17fce31a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -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>

View file

@ -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}`);