mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-30 01:04:25 +01:00 
			
		
		
		
	Fix broken `if` from https://github.com/go-gitea/gitea/pull/29195 Signed-off-by: Yarden Shoham <git@yardenshoham.com>
		
			
				
	
	
		
			17 lines
		
	
	
		
			564 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			564 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import {initCompLabelEdit} from './comp/LabelEdit.js';
 | |
| import {toggleElem} from '../utils/dom.js';
 | |
| 
 | |
| export function initCommonOrganization() {
 | |
|   if (!document.querySelectorAll('.organization').length) {
 | |
|     return;
 | |
|   }
 | |
| 
 | |
|   document.querySelector('.organization.settings.options #org_name')?.addEventListener('input', function () {
 | |
|     const nameChanged = this.value.toLowerCase() !== this.getAttribute('data-org-name').toLowerCase();
 | |
|     toggleElem('#org-name-change-prompt', nameChanged);
 | |
|   });
 | |
| 
 | |
|   // Labels
 | |
|   initCompLabelEdit('.organization.settings.labels');
 | |
| }
 |