2024-07-19 14:28:30 -04:00
|
|
|
export function initOAuth2SettingsDisableCheckbox() {
|
2024-12-21 19:59:25 +01:00
|
|
|
for (const el of document.querySelectorAll<HTMLInputElement>('.disable-setting')) {
|
2025-12-03 03:13:16 +01:00
|
|
|
el.addEventListener('change', (e) => {
|
|
|
|
|
const target = e.target as HTMLInputElement;
|
|
|
|
|
const dataTarget = target.getAttribute('data-target')!;
|
|
|
|
|
document.querySelector(dataTarget)!.classList.toggle('disabled', target.checked);
|
2024-12-15 22:02:32 +01:00
|
|
|
});
|
|
|
|
|
}
|
2024-07-19 14:28:30 -04:00
|
|
|
}
|