mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 06:21:11 +00:00 
			
		
		
		
	fix(ui): clear fields when canceling adding ssh key (#8990)
- Add javascript to clear fields upon clicking the cancel button inside the panel for adding new SSH keys. - Add E2E test. - Resolves #8915 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8990 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: dawe <dawedawe@posteo.de> Co-committed-by: dawe <dawedawe@posteo.de>
This commit is contained in:
		
					parent
					
						
							
								bd59fa4df3
							
						
					
				
			
			
				commit
				
					
						a87153b089
					
				
			
		
					 3 changed files with 27 additions and 1 deletions
				
			
		|  | @ -8,3 +8,10 @@ export function initSshKeyFormParser() { | |||
|     } | ||||
|   }); | ||||
| } | ||||
| 
 | ||||
| export function initSshKeyCancelButton() { | ||||
|   document.getElementById('cancel-ssh-button')?.addEventListener('click', () => { | ||||
|     document.getElementById('ssh-key-title').value = ''; | ||||
|     document.getElementById('ssh-key-content').value = ''; | ||||
|   }); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue