diff --git a/web_src/js/features/common-organization.js b/web_src/js/features/common-organization.js index 352e824b0..a950af3ad 100644 --- a/web_src/js/features/common-organization.js +++ b/web_src/js/features/common-organization.js @@ -1,14 +1,15 @@ -import $ from 'jquery'; import {initCompLabelEdit} from './comp/LabelEdit.js'; import {toggleElem} from '../utils/dom.js'; export function initCommonOrganization() { - if ($('.organization').length === 0) { + if (!document.querySelectorAll('.organization').length) { return; } - $('.organization.settings.options #org_name').on('input', function () { - const nameChanged = $(this).val().toLowerCase() !== $(this).attr('data-org-name').toLowerCase(); + const orgNameInput = document.querySelector('.organization.settings.options #org_name'); + if (!orgNameInput) return; + orgNameInput.addEventListener('input', function () { + const nameChanged = this.value.toLowerCase() !== this.getAttribute('data-org-name').toLowerCase(); toggleElem('#org-name-change-prompt', nameChanged); });