mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Only move code, no unnecessary logic change. (There are many problems in old code, but changing them is not in this PR's scope) Co-authored-by: Giteabot <teabot@gitea.io>
		
			
				
	
	
		
			15 lines
		
	
	
		
			449 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			449 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('input[name="auto_init"]').checked = true;
 | 
						|
      }
 | 
						|
    });
 | 
						|
  }
 | 
						|
}
 |