mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-21 10:23:46 +08:00
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;
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|