Update php/public/forms.js

Co-authored-by: Simon L. <szaimen@e.mail.de>
Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey 2023-06-26 17:42:33 +02:00 committed by GitHub
parent 559101a308
commit dd02dc82a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@
function showPassword(id) {
let passwordField = document.getElementById(id);
if (passwordField.value !== "" && passwordField.type !== "text") {
if (passwordField.type === "password" && passwordField.value !== "") {
passwordField.type = "text";
} else if (passwordField.value === "" && passwordField.type !== "password") {
passwordField.type = "password";