Commit 96a03db1 authored by Illya Klymov's avatar Illya Klymov

Merge branch 'cngo-move-code-out-of-ee-pages' into 'master'

Move code out of ee/pages

See merge request gitlab-org/gitlab!75780
parents 43e8687d f83b3dc5
import 'ee/registrations/welcome/other_role'; import 'ee/registrations/welcome/other_role';
import 'ee/registrations/welcome/jobs_to_be_done'; import 'ee/registrations/welcome/jobs_to_be_done';
import { initWelcomeIndex } from 'ee/registrations/welcome';
const emailUpdatesForm = document.querySelector('.js-email-opt-in'); initWelcomeIndex();
const setupForCompany = document.querySelector('.js-setup-for-company');
const setupForMe = document.querySelector('.js-setup-for-me');
if (emailUpdatesForm) {
if (setupForCompany) {
setupForCompany.addEventListener('change', () => {
emailUpdatesForm.classList.add('hidden');
});
}
if (setupForMe) {
setupForMe.addEventListener('change', () => {
emailUpdatesForm.classList.remove('hidden');
});
}
}
...@@ -4,7 +4,7 @@ import NoEmojiValidator from '~/emoji/no_emoji_validator'; ...@@ -4,7 +4,7 @@ import NoEmojiValidator from '~/emoji/no_emoji_validator';
import LengthValidator from '~/pages/sessions/new/length_validator'; import LengthValidator from '~/pages/sessions/new/length_validator';
import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer'; import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer';
import UsernameValidator from '~/pages/sessions/new/username_validator'; import UsernameValidator from '~/pages/sessions/new/username_validator';
import UsernameSuggester from './username_suggester'; import UsernameSuggester from 'ee/trial_registrations/username_suggester';
new UsernameValidator(); // eslint-disable-line no-new new UsernameValidator(); // eslint-disable-line no-new
new LengthValidator(); // eslint-disable-line no-new new LengthValidator(); // eslint-disable-line no-new
......
import 'ee/pages/trials/namespace_select'; import 'ee/trials/namespace_select';
import 'ee/trials/track_trial_user_errors'; import 'ee/trials/track_trial_user_errors';
import 'ee/pages/trials/country_select'; import 'ee/trials/country_select';
import 'ee/trials/track_trial_user_errors'; import 'ee/trials/track_trial_user_errors';
import 'ee/pages/trials/country_select'; import 'ee/trials/country_select';
import 'ee/pages/trials/namespace_select'; import 'ee/trials/namespace_select';
import Vue from 'vue'; import Vue from 'vue';
import mountVisibilityLevelDropdown from '~/groups/visibility_level'; import mountVisibilityLevelDropdown from '~/groups/visibility_level';
import 'ee/pages/trials/country_select'; import 'ee/trials/country_select';
import RegistrationTrialToggle from '../../components/registration_trial_toggle.vue'; import RegistrationTrialToggle from '../../components/registration_trial_toggle.vue';
function toggleTrialForm(trial) { function toggleTrialForm(trial) {
......
export const initWelcomeIndex = () => {
const emailUpdatesForm = document.querySelector('.js-email-opt-in');
const setupForCompany = document.querySelector('.js-setup-for-company');
const setupForMe = document.querySelector('.js-setup-for-me');
if (emailUpdatesForm) {
if (setupForCompany) {
setupForCompany.addEventListener('change', () => {
emailUpdatesForm.classList.add('hidden');
});
}
if (setupForMe) {
setupForMe.addEventListener('change', () => {
emailUpdatesForm.classList.remove('hidden');
});
}
}
};
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import UsernameSuggester from 'ee/pages/trial_registrations/new/username_suggester'; import UsernameSuggester from 'ee/trial_registrations/username_suggester';
import { setHTMLFixture } from 'helpers/fixtures'; import { setHTMLFixture } from 'helpers/fixtures';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment