mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Remove jQuery .attr from the user search box (#29919)
				
					
				
			- Switched from jQuery `.attr` to plain javascript `.getAttribute` - Tested the user search box and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com>
This commit is contained in:
		| @@ -5,9 +5,12 @@ const {appSubUrl} = window.config; | ||||
| const looksLikeEmailAddressCheck = /^\S+@\S+$/; | ||||
|  | ||||
| export function initCompSearchUserBox() { | ||||
|   const $searchUserBox = $('#search-user-box'); | ||||
|   const allowEmailInput = $searchUserBox.attr('data-allow-email') === 'true'; | ||||
|   const allowEmailDescription = $searchUserBox.attr('data-allow-email-description'); | ||||
|   const searchUserBox = document.getElementById('search-user-box'); | ||||
|   if (!searchUserBox) return; | ||||
|  | ||||
|   const $searchUserBox = $(searchUserBox); | ||||
|   const allowEmailInput = searchUserBox.getAttribute('data-allow-email') === 'true'; | ||||
|   const allowEmailDescription = searchUserBox.getAttribute('data-allow-email-description') ?? undefined; | ||||
|   $searchUserBox.search({ | ||||
|     minCharacters: 2, | ||||
|     apiSettings: { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user