0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-21 01:35:14 +01:00
gitea/web_src/js/features/repo-new.ts

15 lines
467 B
TypeScript
Raw Normal View History

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;
}
});
}
}