|
|
@ -5,15 +5,15 @@ import {POST} from '../../modules/fetch.ts'; |
|
|
|
|
|
|
|
|
|
|
|
const {appSubUrl} = window.config; |
|
|
|
const {appSubUrl} = window.config; |
|
|
|
|
|
|
|
|
|
|
|
function onSecurityProtocolChange() { |
|
|
|
function onSecurityProtocolChange(): void { |
|
|
|
if (Number(document.querySelector('#security_protocol')?.value) > 0) { |
|
|
|
if (Number(document.querySelector<HTMLInputElement>('#security_protocol')?.value) > 0) { |
|
|
|
showElem('.has-tls'); |
|
|
|
showElem('.has-tls'); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
hideElem('.has-tls'); |
|
|
|
hideElem('.has-tls'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export function initAdminCommon() { |
|
|
|
export function initAdminCommon(): void { |
|
|
|
if (!document.querySelector('.page-content.admin')) return; |
|
|
|
if (!document.querySelector('.page-content.admin')) return; |
|
|
|
|
|
|
|
|
|
|
|
// check whether appUrl(ROOT_URL) is correct, if not, show an error message
|
|
|
|
// check whether appUrl(ROOT_URL) is correct, if not, show an error message
|
|
|
@ -21,34 +21,34 @@ export function initAdminCommon() { |
|
|
|
|
|
|
|
|
|
|
|
// New user
|
|
|
|
// New user
|
|
|
|
if ($('.admin.new.user').length > 0 || $('.admin.edit.user').length > 0) { |
|
|
|
if ($('.admin.new.user').length > 0 || $('.admin.edit.user').length > 0) { |
|
|
|
document.querySelector('#login_type')?.addEventListener('change', function () { |
|
|
|
document.querySelector<HTMLInputElement>('#login_type')?.addEventListener('change', function () { |
|
|
|
if (this.value?.substring(0, 1) === '0') { |
|
|
|
if (this.value?.startsWith('0')) { |
|
|
|
document.querySelector('#user_name')?.removeAttribute('disabled'); |
|
|
|
document.querySelector<HTMLInputElement>('#user_name')?.removeAttribute('disabled'); |
|
|
|
document.querySelector('#login_name')?.removeAttribute('required'); |
|
|
|
document.querySelector<HTMLInputElement>('#login_name')?.removeAttribute('required'); |
|
|
|
hideElem('.non-local'); |
|
|
|
hideElem('.non-local'); |
|
|
|
showElem('.local'); |
|
|
|
showElem('.local'); |
|
|
|
document.querySelector('#user_name')?.focus(); |
|
|
|
document.querySelector<HTMLInputElement>('#user_name')?.focus(); |
|
|
|
|
|
|
|
|
|
|
|
if (this.getAttribute('data-password') === 'required') { |
|
|
|
if (this.getAttribute('data-password') === 'required') { |
|
|
|
document.querySelector('#password')?.setAttribute('required', 'required'); |
|
|
|
document.querySelector('#password')?.setAttribute('required', 'required'); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (document.querySelector('.admin.edit.user')) { |
|
|
|
if (document.querySelector<HTMLDivElement>('.admin.edit.user')) { |
|
|
|
document.querySelector('#user_name')?.setAttribute('disabled', 'disabled'); |
|
|
|
document.querySelector<HTMLInputElement>('#user_name')?.setAttribute('disabled', 'disabled'); |
|
|
|
} |
|
|
|
} |
|
|
|
document.querySelector('#login_name')?.setAttribute('required', 'required'); |
|
|
|
document.querySelector<HTMLInputElement>('#login_name')?.setAttribute('required', 'required'); |
|
|
|
showElem('.non-local'); |
|
|
|
showElem('.non-local'); |
|
|
|
hideElem('.local'); |
|
|
|
hideElem('.local'); |
|
|
|
document.querySelector('#login_name')?.focus(); |
|
|
|
document.querySelector<HTMLInputElement>('#login_name')?.focus(); |
|
|
|
|
|
|
|
|
|
|
|
document.querySelector('#password')?.removeAttribute('required'); |
|
|
|
document.querySelector<HTMLInputElement>('#password')?.removeAttribute('required'); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function onUsePagedSearchChange() { |
|
|
|
function onUsePagedSearchChange() { |
|
|
|
const searchPageSizeElements = document.querySelectorAll('.search-page-size'); |
|
|
|
const searchPageSizeElements = document.querySelectorAll<HTMLDivElement>('.search-page-size'); |
|
|
|
if (document.querySelector('#use_paged_search').checked) { |
|
|
|
if (document.querySelector<HTMLInputElement>('#use_paged_search').checked) { |
|
|
|
showElem('.search-page-size'); |
|
|
|
showElem('.search-page-size'); |
|
|
|
for (const el of searchPageSizeElements) { |
|
|
|
for (const el of searchPageSizeElements) { |
|
|
|
el.querySelector('input')?.setAttribute('required', 'required'); |
|
|
|
el.querySelector('input')?.setAttribute('required', 'required'); |
|
|
@ -61,20 +61,20 @@ export function initAdminCommon() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function onOAuth2Change(applyDefaultValues) { |
|
|
|
function onOAuth2Change(applyDefaultValues: boolean) { |
|
|
|
hideElem('.open_id_connect_auto_discovery_url, .oauth2_use_custom_url'); |
|
|
|
hideElem('.open_id_connect_auto_discovery_url, .oauth2_use_custom_url'); |
|
|
|
for (const input of document.querySelectorAll('.open_id_connect_auto_discovery_url input[required]')) { |
|
|
|
for (const input of document.querySelectorAll<HTMLInputElement>('.open_id_connect_auto_discovery_url input[required]')) { |
|
|
|
input.removeAttribute('required'); |
|
|
|
input.removeAttribute('required'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const provider = document.querySelector('#oauth2_provider').value; |
|
|
|
const provider = document.querySelector<HTMLInputElement>('#oauth2_provider').value; |
|
|
|
switch (provider) { |
|
|
|
switch (provider) { |
|
|
|
case 'openidConnect': |
|
|
|
case 'openidConnect': |
|
|
|
document.querySelector('.open_id_connect_auto_discovery_url input').setAttribute('required', 'required'); |
|
|
|
document.querySelector<HTMLInputElement>('.open_id_connect_auto_discovery_url input').setAttribute('required', 'required'); |
|
|
|
showElem('.open_id_connect_auto_discovery_url'); |
|
|
|
showElem('.open_id_connect_auto_discovery_url'); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: { |
|
|
|
default: { |
|
|
|
const elProviderCustomUrlSettings = document.querySelector(`#${provider}_customURLSettings`); |
|
|
|
const elProviderCustomUrlSettings = document.querySelector<HTMLInputElement>(`#${provider}_customURLSettings`); |
|
|
|
if (!elProviderCustomUrlSettings) break; // some providers do not have custom URL settings
|
|
|
|
if (!elProviderCustomUrlSettings) break; // some providers do not have custom URL settings
|
|
|
|
const couldChangeCustomURLs = elProviderCustomUrlSettings.getAttribute('data-available') === 'true'; |
|
|
|
const couldChangeCustomURLs = elProviderCustomUrlSettings.getAttribute('data-available') === 'true'; |
|
|
|
const mustProvideCustomURLs = elProviderCustomUrlSettings.getAttribute('data-required') === 'true'; |
|
|
|
const mustProvideCustomURLs = elProviderCustomUrlSettings.getAttribute('data-required') === 'true'; |
|
|
@ -82,7 +82,7 @@ export function initAdminCommon() { |
|
|
|
showElem('.oauth2_use_custom_url'); // show the checkbox
|
|
|
|
showElem('.oauth2_use_custom_url'); // show the checkbox
|
|
|
|
} |
|
|
|
} |
|
|
|
if (mustProvideCustomURLs) { |
|
|
|
if (mustProvideCustomURLs) { |
|
|
|
document.querySelector('#oauth2_use_custom_url').checked = true; // make the checkbox checked
|
|
|
|
document.querySelector<HTMLInputElement>('#oauth2_use_custom_url').checked = true; // make the checkbox checked
|
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
@ -91,17 +91,17 @@ export function initAdminCommon() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function onOAuth2UseCustomURLChange(applyDefaultValues) { |
|
|
|
function onOAuth2UseCustomURLChange(applyDefaultValues) { |
|
|
|
const provider = document.querySelector('#oauth2_provider').value; |
|
|
|
const provider = document.querySelector<HTMLInputElement>('#oauth2_provider').value; |
|
|
|
hideElem('.oauth2_use_custom_url_field'); |
|
|
|
hideElem('.oauth2_use_custom_url_field'); |
|
|
|
for (const input of document.querySelectorAll('.oauth2_use_custom_url_field input[required]')) { |
|
|
|
for (const input of document.querySelectorAll<HTMLInputElement>('.oauth2_use_custom_url_field input[required]')) { |
|
|
|
input.removeAttribute('required'); |
|
|
|
input.removeAttribute('required'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const elProviderCustomUrlSettings = document.querySelector(`#${provider}_customURLSettings`); |
|
|
|
const elProviderCustomUrlSettings = document.querySelector(`#${provider}_customURLSettings`); |
|
|
|
if (elProviderCustomUrlSettings && document.querySelector('#oauth2_use_custom_url').checked) { |
|
|
|
if (elProviderCustomUrlSettings && document.querySelector<HTMLInputElement>('#oauth2_use_custom_url').checked) { |
|
|
|
for (const custom of ['token_url', 'auth_url', 'profile_url', 'email_url', 'tenant']) { |
|
|
|
for (const custom of ['token_url', 'auth_url', 'profile_url', 'email_url', 'tenant']) { |
|
|
|
if (applyDefaultValues) { |
|
|
|
if (applyDefaultValues) { |
|
|
|
document.querySelector(`#oauth2_${custom}`).value = document.querySelector(`#${provider}_${custom}`).value; |
|
|
|
document.querySelector<HTMLInputElement>(`#oauth2_${custom}`).value = document.querySelector<HTMLInputElement>(`#${provider}_${custom}`).value; |
|
|
|
} |
|
|
|
} |
|
|
|
const customInput = document.querySelector(`#${provider}_${custom}`); |
|
|
|
const customInput = document.querySelector(`#${provider}_${custom}`); |
|
|
|
if (customInput && customInput.getAttribute('data-available') === 'true') { |
|
|
|
if (customInput && customInput.getAttribute('data-available') === 'true') { |
|
|
@ -115,25 +115,26 @@ export function initAdminCommon() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function onEnableLdapGroupsChange() { |
|
|
|
function onEnableLdapGroupsChange() { |
|
|
|
toggleElem(document.querySelector('#ldap-group-options'), $('.js-ldap-group-toggle')[0].checked); |
|
|
|
const checked = document.querySelector<HTMLInputElement>('.js-ldap-group-toggle')?.checked; |
|
|
|
|
|
|
|
toggleElem(document.querySelector('#ldap-group-options'), checked); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// New authentication
|
|
|
|
// New authentication
|
|
|
|
if (document.querySelector('.admin.new.authentication')) { |
|
|
|
if (document.querySelector<HTMLDivElement>('.admin.new.authentication')) { |
|
|
|
document.querySelector('#auth_type')?.addEventListener('change', function () { |
|
|
|
document.querySelector<HTMLInputElement>('#auth_type')?.addEventListener('change', function () { |
|
|
|
hideElem('.ldap, .dldap, .smtp, .pam, .oauth2, .has-tls, .search-page-size, .sspi'); |
|
|
|
hideElem('.ldap, .dldap, .smtp, .pam, .oauth2, .has-tls, .search-page-size, .sspi'); |
|
|
|
|
|
|
|
|
|
|
|
for (const input of document.querySelectorAll('.ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required], .sspi input[required]')) { |
|
|
|
for (const input of document.querySelectorAll<HTMLInputElement>('.ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required], .sspi input[required]')) { |
|
|
|
input.removeAttribute('required'); |
|
|
|
input.removeAttribute('required'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
document.querySelector('.binddnrequired')?.classList.remove('required'); |
|
|
|
document.querySelector<HTMLDivElement>('.binddnrequired')?.classList.remove('required'); |
|
|
|
|
|
|
|
|
|
|
|
const authType = this.value; |
|
|
|
const authType = this.value; |
|
|
|
switch (authType) { |
|
|
|
switch (authType) { |
|
|
|
case '2': // LDAP
|
|
|
|
case '2': // LDAP
|
|
|
|
showElem('.ldap'); |
|
|
|
showElem('.ldap'); |
|
|
|
for (const input of document.querySelectorAll('.binddnrequired input, .ldap div.required:not(.dldap) input')) { |
|
|
|
for (const input of document.querySelectorAll<HTMLInputElement>('.binddnrequired input, .ldap div.required:not(.dldap) input')) { |
|
|
|
input.setAttribute('required', 'required'); |
|
|
|
input.setAttribute('required', 'required'); |
|
|
|
} |
|
|
|
} |
|
|
|
document.querySelector('.binddnrequired')?.classList.add('required'); |
|
|
|
document.querySelector('.binddnrequired')?.classList.add('required'); |
|
|
@ -141,32 +142,32 @@ export function initAdminCommon() { |
|
|
|
case '3': // SMTP
|
|
|
|
case '3': // SMTP
|
|
|
|
showElem('.smtp'); |
|
|
|
showElem('.smtp'); |
|
|
|
showElem('.has-tls'); |
|
|
|
showElem('.has-tls'); |
|
|
|
for (const input of document.querySelectorAll('.smtp div.required input, .has-tls')) { |
|
|
|
for (const input of document.querySelectorAll<HTMLInputElement>('.smtp div.required input, .has-tls')) { |
|
|
|
input.setAttribute('required', 'required'); |
|
|
|
input.setAttribute('required', 'required'); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case '4': // PAM
|
|
|
|
case '4': // PAM
|
|
|
|
showElem('.pam'); |
|
|
|
showElem('.pam'); |
|
|
|
for (const input of document.querySelectorAll('.pam input')) { |
|
|
|
for (const input of document.querySelectorAll<HTMLInputElement>('.pam input')) { |
|
|
|
input.setAttribute('required', 'required'); |
|
|
|
input.setAttribute('required', 'required'); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case '5': // LDAP
|
|
|
|
case '5': // LDAP
|
|
|
|
showElem('.dldap'); |
|
|
|
showElem('.dldap'); |
|
|
|
for (const input of document.querySelectorAll('.dldap div.required:not(.ldap) input')) { |
|
|
|
for (const input of document.querySelectorAll<HTMLInputElement>('.dldap div.required:not(.ldap) input')) { |
|
|
|
input.setAttribute('required', 'required'); |
|
|
|
input.setAttribute('required', 'required'); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case '6': // OAuth2
|
|
|
|
case '6': // OAuth2
|
|
|
|
showElem('.oauth2'); |
|
|
|
showElem('.oauth2'); |
|
|
|
for (const input of document.querySelectorAll('.oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input')) { |
|
|
|
for (const input of document.querySelectorAll<HTMLInputElement>('.oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input')) { |
|
|
|
input.setAttribute('required', 'required'); |
|
|
|
input.setAttribute('required', 'required'); |
|
|
|
} |
|
|
|
} |
|
|
|
onOAuth2Change(true); |
|
|
|
onOAuth2Change(true); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case '7': // SSPI
|
|
|
|
case '7': // SSPI
|
|
|
|
showElem('.sspi'); |
|
|
|
showElem('.sspi'); |
|
|
|
for (const input of document.querySelectorAll('.sspi div.required input')) { |
|
|
|
for (const input of document.querySelectorAll<HTMLInputElement>('.sspi div.required input')) { |
|
|
|
input.setAttribute('required', 'required'); |
|
|
|
input.setAttribute('required', 'required'); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
@ -180,39 +181,39 @@ export function initAdminCommon() { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
$('#auth_type').trigger('change'); |
|
|
|
$('#auth_type').trigger('change'); |
|
|
|
document.querySelector('#security_protocol')?.addEventListener('change', onSecurityProtocolChange); |
|
|
|
document.querySelector<HTMLInputElement>('#security_protocol')?.addEventListener('change', onSecurityProtocolChange); |
|
|
|
document.querySelector('#use_paged_search')?.addEventListener('change', onUsePagedSearchChange); |
|
|
|
document.querySelector<HTMLInputElement>('#use_paged_search')?.addEventListener('change', onUsePagedSearchChange); |
|
|
|
document.querySelector('#oauth2_provider')?.addEventListener('change', () => onOAuth2Change(true)); |
|
|
|
document.querySelector<HTMLInputElement>('#oauth2_provider')?.addEventListener('change', () => onOAuth2Change(true)); |
|
|
|
document.querySelector('#oauth2_use_custom_url')?.addEventListener('change', () => onOAuth2UseCustomURLChange(true)); |
|
|
|
document.querySelector<HTMLInputElement>('#oauth2_use_custom_url')?.addEventListener('change', () => onOAuth2UseCustomURLChange(true)); |
|
|
|
$('.js-ldap-group-toggle').on('change', onEnableLdapGroupsChange); |
|
|
|
$('.js-ldap-group-toggle').on('change', onEnableLdapGroupsChange); |
|
|
|
} |
|
|
|
} |
|
|
|
// Edit authentication
|
|
|
|
// Edit authentication
|
|
|
|
if (document.querySelector('.admin.edit.authentication')) { |
|
|
|
if (document.querySelector<HTMLDivElement>('.admin.edit.authentication')) { |
|
|
|
const authType = document.querySelector('#auth_type')?.value; |
|
|
|
const authType = document.querySelector<HTMLInputElement>('#auth_type')?.value; |
|
|
|
if (authType === '2' || authType === '5') { |
|
|
|
if (authType === '2' || authType === '5') { |
|
|
|
document.querySelector('#security_protocol')?.addEventListener('change', onSecurityProtocolChange); |
|
|
|
document.querySelector<HTMLInputElement>('#security_protocol')?.addEventListener('change', onSecurityProtocolChange); |
|
|
|
$('.js-ldap-group-toggle').on('change', onEnableLdapGroupsChange); |
|
|
|
$('.js-ldap-group-toggle').on('change', onEnableLdapGroupsChange); |
|
|
|
onEnableLdapGroupsChange(); |
|
|
|
onEnableLdapGroupsChange(); |
|
|
|
if (authType === '2') { |
|
|
|
if (authType === '2') { |
|
|
|
document.querySelector('#use_paged_search')?.addEventListener('change', onUsePagedSearchChange); |
|
|
|
document.querySelector<HTMLInputElement>('#use_paged_search')?.addEventListener('change', onUsePagedSearchChange); |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (authType === '6') { |
|
|
|
} else if (authType === '6') { |
|
|
|
document.querySelector('#oauth2_provider')?.addEventListener('change', () => onOAuth2Change(true)); |
|
|
|
document.querySelector<HTMLInputElement>('#oauth2_provider')?.addEventListener('change', () => onOAuth2Change(true)); |
|
|
|
document.querySelector('#oauth2_use_custom_url')?.addEventListener('change', () => onOAuth2UseCustomURLChange(false)); |
|
|
|
document.querySelector<HTMLInputElement>('#oauth2_use_custom_url')?.addEventListener('change', () => onOAuth2UseCustomURLChange(false)); |
|
|
|
onOAuth2Change(false); |
|
|
|
onOAuth2Change(false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (document.querySelector('.admin.authentication')) { |
|
|
|
if (document.querySelector<HTMLDivElement>('.admin.authentication')) { |
|
|
|
$('#auth_name').on('input', function () { |
|
|
|
$('#auth_name').on('input', function () { |
|
|
|
// appSubUrl is either empty or is a path that starts with `/` and doesn't have a trailing slash.
|
|
|
|
// appSubUrl is either empty or is a path that starts with `/` and doesn't have a trailing slash.
|
|
|
|
document.querySelector('#oauth2-callback-url').textContent = `${window.location.origin}${appSubUrl}/user/oauth2/${encodeURIComponent(this.value)}/callback`; |
|
|
|
document.querySelector('#oauth2-callback-url').textContent = `${window.location.origin}${appSubUrl}/user/oauth2/${encodeURIComponent((this as HTMLInputElement).value)}/callback`; |
|
|
|
}).trigger('input'); |
|
|
|
}).trigger('input'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Notice
|
|
|
|
// Notice
|
|
|
|
if (document.querySelector('.admin.notice')) { |
|
|
|
if (document.querySelector<HTMLDivElement>('.admin.notice')) { |
|
|
|
const detailModal = document.querySelector('#detail-modal'); |
|
|
|
const detailModal = document.querySelector<HTMLDivElement>('#detail-modal'); |
|
|
|
|
|
|
|
|
|
|
|
// Attach view detail modals
|
|
|
|
// Attach view detail modals
|
|
|
|
$('.view-detail').on('click', function () { |
|
|
|
$('.view-detail').on('click', function () { |
|
|
@ -223,7 +224,7 @@ export function initAdminCommon() { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// Select actions
|
|
|
|
// Select actions
|
|
|
|
const checkboxes = document.querySelectorAll('.select.table .ui.checkbox input'); |
|
|
|
const checkboxes = document.querySelectorAll<HTMLInputElement>('.select.table .ui.checkbox input'); |
|
|
|
|
|
|
|
|
|
|
|
$('.select.action').on('click', function () { |
|
|
|
$('.select.action').on('click', function () { |
|
|
|
switch ($(this).data('action')) { |
|
|
|
switch ($(this).data('action')) { |
|
|
@ -244,7 +245,7 @@ export function initAdminCommon() { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
document.querySelector('#delete-selection')?.addEventListener('click', async function (e) { |
|
|
|
document.querySelector<HTMLButtonElement>('#delete-selection')?.addEventListener('click', async function (e) { |
|
|
|
e.preventDefault(); |
|
|
|
e.preventDefault(); |
|
|
|
this.classList.add('is-loading', 'disabled'); |
|
|
|
this.classList.add('is-loading', 'disabled'); |
|
|
|
const data = new FormData(); |
|
|
|
const data = new FormData(); |
|
|
|