Initial commit, source code of Gitea 1.23.1
This commit is contained in:
14
web_src/js/features/repo-new.ts
Normal file
14
web_src/js/features/repo-new.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user