mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix delete u2f keys bug (#18042)
Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		@@ -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>
 | 
			
		||||
 
 | 
			
		||||
@@ -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}`);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user