summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages/groups/edit/index.js
blob: f6155b2ab2fc386d29d8acf93dc1f310b369ae4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { GROUP_BADGE } from '~/badges/constants';
import dirtySubmitFactory from '~/dirty_submit/dirty_submit_factory';
import initFilePickers from '~/file_pickers';
import TransferDropdown from '~/groups/transfer_dropdown';
import setupTransferEdit from '~/groups/transfer_edit';
import groupsSelect from '~/groups_select';
import { initCascadingSettingsLockPopovers } from '~/namespaces/cascading_settings';
import mountBadgeSettings from '~/pages/shared/mount_badge_settings';
import projectSelect from '~/project_select';
import initSearchSettings from '~/search_settings';
import initSettingsPanels from '~/settings_panels';
import initConfirmDanger from '~/init_confirm_danger';

document.addEventListener('DOMContentLoaded', () => {
  initFilePickers();
  initConfirmDanger();
  initSettingsPanels();
  dirtySubmitFactory(
    document.querySelectorAll('.js-general-settings-form, .js-general-permissions-form'),
  );
  mountBadgeSettings(GROUP_BADGE);
  setupTransferEdit('.js-group-transfer-form', '#new_parent_group_id');

  // Initialize Subgroups selector
  groupsSelect();

  projectSelect();

  initSearchSettings();
  initCascadingSettingsLockPopovers();

  return new TransferDropdown();
});