From 61d710dd8ced5e0e73ab1fc05f0032aace7bf4d9 Mon Sep 17 00:00:00 2001 From: eastargh Date: Wed, 1 Jul 2026 14:23:55 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B4=88=EA=B8=B0=EB=B9=84=EB=B0=80=EB=B2=88?= =?UTF-8?q?=ED=98=B8=EB=A1=9C=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=EC=8B=9C=20?= =?UTF-8?q?=EB=B9=84=EB=B0=80=EB=B2=88=ED=98=B8=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=20=EC=98=A4=ED=94=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/jsp/common/screen/emergency.jsp | 71 +++++++++++-------- .../rms/common/acl/user/UserManService.java | 9 ++- .../rms/common/context/MonitoringContext.java | 3 + .../rms/common/login/LoginResponseDto.java | 5 ++ .../eai/rms/common/login/MainController.java | 18 +++++ 5 files changed, 74 insertions(+), 32 deletions(-) diff --git a/WebContent/jsp/common/screen/emergency.jsp b/WebContent/jsp/common/screen/emergency.jsp index b98632b..d2a2149 100644 --- a/WebContent/jsp/common/screen/emergency.jsp +++ b/WebContent/jsp/common/screen/emergency.jsp @@ -91,7 +91,10 @@ data: $('#loginForm').serialize(), dataType: 'json', success: function(response) { - if (response.smsAuthRequired) { + if (response.changePassword) { + showChangeInitPassword(response); + } + else if (response.smsAuthRequired) { // SMS 인증 필요 showSmsAuthModal(response); } else if (response.success) { @@ -108,6 +111,13 @@ } }); } + + function showChangeInitPassword(data) { + $('input[name="resetUserId"]').val($('input[name="userId"]').val()); + $('input[name="resetPassword"]').val($('input[name="password"]').val()); + $('#changeInitPassword').hide(); + $('#pwdChgModal').modal('show'); + } // SMS 인증 모달 표시 function showSmsAuthModal(data) { @@ -218,44 +228,39 @@ clearInterval(resendTimer); $('#smsAuthModal').modal('hide'); } - function changePwd(){ + + function checkPwd(){ if ($("input[name=resetUserId]").val() == null || $("input[name=resetUserId]").val().length == 0 ){ alert("<%= localeMessage.getString("login.checkid") %>"); $("input[name=resetUserId]").trigger("focus"); - return; + return false; } if ($("input[name=resetPassword]").val() == null || $("input[name=resetPassword]").val().trim().length == 0 ){ alert("<%= localeMessage.getString("login.checkpwd1") %>"); $("input[name=resetPassword]").trigger("focus"); - return; + return false; } if ($("input[name=changePassword]").val() == null || $("input[name=changePassword]").val().trim().length == 0 ){ alert("<%= localeMessage.getString("login.checkpwd2") %>"); $("input[name=changePassword]").trigger("focus"); - return ; + return false; } if ($("input[name=confirmPassword]").val() == null || $("input[name=confirmPassword]").val().trim().length == 0 ){ alert("<%= localeMessage.getString("login.checkpwd3") %>"); - return ; + return false; } - if ($("input[name=confirmPassword]").val() != $("input[name=confirmPassword]").val()){ + if ($("input[name=changePassword]").val() != $("input[name=confirmPassword]").val()){ alert("<%= localeMessage.getString("login.checkpwd4") %>"); $("input[name=confirmPassword]").trigger("focus"); - return ; + return false; } if ($("input[name=resetUserId]").val() == $("input[name=changePassword]").val()){ alert("<%= localeMessage.getString("login.checkpwd5") %>"); $("input[name=changePassword]").trigger("focus"); - return ; + return false; } - //if (idCheck.checked){ - // setCookie("key",id); - //} - <%-- $("form").attr("action",""); - //$("form").action = "<%=request.getContextPath()%>/changePassword.do"; - --%> - $("form").submit(); + return true; } $(document).ready(function() { @@ -271,14 +276,22 @@ }); $("input[name=changePassword]").keydown(function(event){ if ( event.which == 13 ) { - changePwd(); + $('#modalLoginForm').submit(); } }); $("input[name=confirmPassword]").keydown(function(event){ if ( event.which == 13 ) { - changePwd(); + $('#modalLoginForm').submit(); } }); + // Password Change 링크로 직접 열 때만 초기화 (JS에서 modal('show') 호출 시 relatedTarget 없음) + $('#pwdChgModal').on('show.bs.modal', function(event) { + if (event.relatedTarget) { + $('#modalLoginForm')[0].reset(); + $('#changeInitPassword').show(); + } + }); + $("select[name=serviceType]").change(function(){ fncPreMain(); }); @@ -286,9 +299,7 @@ $("#btn_login").click(function(){ fncPreMain(); }); - $("#changePwd").click(function(){ - changePwd(); - }); + $("#btn_sso_login").click(function(){ fncSsoLogin(); }); @@ -366,7 +377,7 @@ - +