rDrama/files/assets/js/settings_security.js
TLSM 4cfd1d5a5b
Fix 2FA modal not displaying in UI (#178). (#180)
Fixes issue #178. Root cause was attempting to document.getElementById
of both modal and toggle input before both were loaded into the DOM.
In the upstream, Cloudflare's Rocket Loader is used, which papers over
many cases of inattention to loading order.
2022-08-16 22:38:19 -05:00

14 lines
635 B
JavaScript

document.getElementById('new_email').addEventListener('input', function () {
document.getElementById("email-password").classList.remove("d-none");
document.getElementById("email-password-label").classList.remove("d-none");
document.getElementById("emailpasswordRequired").classList.remove("d-none");
});
document.getElementById('2faToggle').addEventListener('change', function () {
const twoStepModal = new bootstrap.Modal(document.getElementById('2faModal'));
twoStepModal.show();
});
function emailVerifyText() {
document.getElementById("email-verify-text").innerHTML = "Verification email sent! Please check your inbox.";
}