diff --git a/packages/atlas/src/theme/web/js/toggle-password.js b/packages/atlas/src/theme/web/js/toggle-password.js new file mode 100644 index 000000000..c52027125 --- /dev/null +++ b/packages/atlas/src/theme/web/js/toggle-password.js @@ -0,0 +1,15 @@ +(function() { + const passwordInput = document.getElementById("passwordInput"); + const passwordToggle = document.getElementById("passwordToggle"); + + function togglePassword() { + if (passwordToggle.classList.contains("glyphicon-eye-close")) + passwordToggle.classList.replace("glyphicon-eye-close", "glyphicon-eye-open"); + else passwordToggle.classList.replace("glyphicon-eye-open", "glyphicon-eye-close"); + + if (passwordInput.type === "password") passwordInput.type = "text"; + else passwordInput.type = "password"; + } + + passwordToggle.addEventListener("click", togglePassword); +})(); \ No newline at end of file diff --git a/packages/atlas/src/theme/web/login-with-mendixsso-button.html b/packages/atlas/src/theme/web/login-with-mendixsso-button.html index e58343b37..813622b99 100644 --- a/packages/atlas/src/theme/web/login-with-mendixsso-button.html +++ b/packages/atlas/src/theme/web/login-with-mendixsso-button.html @@ -47,7 +47,7 @@