mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-05 01:39:13 +01:00
1d4ce531fd
Fix broken `if` from https://github.com/go-gitea/gitea/pull/29195 Signed-off-by: Yarden Shoham <git@yardenshoham.com> (cherry picked from commit 2d8756a9607ee6029ad7a44985e9751988d5fdaa)
16 lines
564 B
JavaScript
16 lines
564 B
JavaScript
import {initCompLabelEdit} from './comp/LabelEdit.js';
|
|
import {toggleElem} from '../utils/dom.js';
|
|
|
|
export function initCommonOrganization() {
|
|
if (!document.querySelectorAll('.organization').length) {
|
|
return;
|
|
}
|
|
|
|
document.querySelector('.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('.organization.settings.labels');
|
|
}
|