2018-11-08 19:23:39 +05:30
|
|
|
import AddSshKeyValidation from '~/profile/add_ssh_key_validation';
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
const input = document.querySelector('.js-add-ssh-key-validation-input');
|
2019-07-31 22:56:46 +05:30
|
|
|
if (!input) return;
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
const warning = document.querySelector('.js-add-ssh-key-validation-warning');
|
|
|
|
const originalSubmit = input.form.querySelector('.js-add-ssh-key-validation-original-submit');
|
|
|
|
const confirmSubmit = warning.querySelector('.js-add-ssh-key-validation-confirm-submit');
|
|
|
|
|
|
|
|
const addSshKeyValidation = new AddSshKeyValidation(
|
|
|
|
input,
|
|
|
|
warning,
|
|
|
|
originalSubmit,
|
|
|
|
confirmSubmit,
|
|
|
|
);
|
|
|
|
addSshKeyValidation.register();
|
|
|
|
});
|