mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 12:53:43 +01:00 
			
		
		
		
	Fixes 96 typescript errors. Behaviour changes are commented below. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
		
			
				
	
	
		
			15 lines
		
	
	
		
			467 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			467 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import $ from 'jquery';
 | 
						|
 | 
						|
export function initRepoNew() {
 | 
						|
  // Repo Creation
 | 
						|
  if ($('.repository.new.repo').length > 0) {
 | 
						|
    $('input[name="gitignores"], input[name="license"]').on('change', () => {
 | 
						|
      const gitignores = $('input[name="gitignores"]').val();
 | 
						|
      const license = $('input[name="license"]').val();
 | 
						|
      if (gitignores || license) {
 | 
						|
        document.querySelector<HTMLInputElement>('input[name="auto_init"]').checked = true;
 | 
						|
      }
 | 
						|
    });
 | 
						|
  }
 | 
						|
}
 |