From 5db7f75292eb7ad0a8cfd3d1afe6b29202e25c1d Mon Sep 17 00:00:00 2001 From: eddie <13182421+cpalv@users.noreply.github.com> Date: Tue, 1 Oct 2024 02:06:38 -0500 Subject: [PATCH] hide otp --- src/www/system_usermanager.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/www/system_usermanager.php b/src/www/system_usermanager.php index 2ebd89216c1..d976d039b61 100644 --- a/src/www/system_usermanager.php +++ b/src/www/system_usermanager.php @@ -434,6 +434,19 @@ function get_user_privdesc(& $user) $('#otp_qrcode').show(); }); + // Show OTP + var otp_hidden = true; + $('#show_otp').on("click", function () { + if (otp_hidden) { + var hidden = document.getElementById("otp_seed").value; + document.getElementById("otp_seed_text").textContent = hidden; + otp_hidden = false; + } else { + document.getElementById("otp_seed_text").textContent = '****************'; + otp_hidden = true; + } + }); + // remove user $(".act-del-user").click(function(event){ var userid = $(this).data('userid'); @@ -913,9 +926,13 @@ class="btn btn-default btn-xs" data-toggle="tooltip" title="=gettext("export c