From f84ef226ea56748306a69130eaeef0b46d59ca14 Mon Sep 17 00:00:00 2001 From: QuocAnh Date: Tue, 24 Sep 2024 00:08:37 +0700 Subject: [PATCH] fix cannot verify OTP --- .../webapp/WEB-INF/jspf/guest/components/verify.jspf | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/WEB-INF/jspf/guest/components/verify.jspf b/src/main/webapp/WEB-INF/jspf/guest/components/verify.jspf index bdbb782..8cf12ba 100644 --- a/src/main/webapp/WEB-INF/jspf/guest/components/verify.jspf +++ b/src/main/webapp/WEB-INF/jspf/guest/components/verify.jspf @@ -76,6 +76,16 @@ event.stopPropagation(); confirmCloseOTP(); }); + +document.addEventListener("DOMContentLoaded", function() { + const otpModal = document.getElementById('trigger-otp-modal'); + const triggerOtp = otpModal.getAttribute('data-trigger-otp'); + console.log(triggerOtp); + if (triggerOtp === 'true') { + const modalInstance = new bootstrap.Modal(otpModal); + modalInstance.show(); + } + }); @@ -103,4 +113,4 @@ - \ No newline at end of file +