mirror of https://github.com/go-gitea/gitea.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
596 B
16 lines
596 B
import {initCompLabelEdit} from './comp/LabelEdit.ts'; |
|
import {toggleElem} from '../utils/dom.ts'; |
|
|
|
export function initCommonOrganization() { |
|
if (!document.querySelectorAll('.organization').length) { |
|
return; |
|
} |
|
|
|
document.querySelector<HTMLInputElement>('.organization.settings.options #org_name')?.addEventListener('input', function () { |
|
const nameChanged = this.value.toLowerCase() !== this.getAttribute('data-org-name')!.toLowerCase(); |
|
toggleElem('#org-name-change-prompt', nameChanged); |
|
}); |
|
|
|
// Labels |
|
initCompLabelEdit('.page-content.organization.settings.labels'); |
|
}
|
|
|