2022-01-28 21:00:11 +00:00
|
|
|
import $ from 'jquery';
|
2021-10-16 17:28:04 +00:00
|
|
|
import {initCompLabelEdit} from './comp/LabelEdit.js';
|
2023-04-17 15:35:57 +00:00
|
|
|
import {toggleElem} from '../utils/dom.js';
|
2021-10-16 17:28:04 +00:00
|
|
|
|
|
|
|
export function initCommonOrganization() {
|
|
|
|
if ($('.organization').length === 0) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2023-04-17 15:35:57 +00:00
|
|
|
$('.organization.settings.options #org_name').on('input', function () {
|
|
|
|
const nameChanged = $(this).val().toLowerCase() !== $(this).attr('data-org-name').toLowerCase();
|
|
|
|
toggleElem('#org-name-change-prompt', nameChanged);
|
|
|
|
});
|
2021-10-16 17:28:04 +00:00
|
|
|
|
|
|
|
// Labels
|
|
|
|
initCompLabelEdit('.organization.settings.labels');
|
|
|
|
}
|