diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml index 503da76..57664b8 100644 --- a/WebContent/WEB-INF/web.xml +++ b/WebContent/WEB-INF/web.xml @@ -175,6 +175,6 @@ - 60 + 10 \ No newline at end of file diff --git a/WebContent/WEB-INF/weblogic-web.xml b/WebContent/WEB-INF/weblogic-web.xml index 99a381a..20461dc 100644 --- a/WebContent/WEB-INF/weblogic-web.xml +++ b/WebContent/WEB-INF/weblogic-web.xml @@ -145,6 +145,6 @@ - 60 + 10 \ No newline at end of file diff --git a/WebContent/jsp/common/screen/emergency.jsp b/WebContent/jsp/common/screen/emergency.jsp index dfc47f9..e85c537 100644 --- a/WebContent/jsp/common/screen/emergency.jsp +++ b/WebContent/jsp/common/screen/emergency.jsp @@ -102,7 +102,7 @@ window.location.href = response.redirectUrl; } else { // 로그인 실패 - alert(response.errorMessage || '로그인에 실패했습니다.'); + alert('로그인에 실패했습니다'); } }, error: function(xhr, status, error) { @@ -262,7 +262,36 @@ return true; } - + + // 비밀번호 변경 요청 (AJAX) - 서버 룰 검증 실패 시 모달을 닫지 않고 비밀번호 입력값만 초기화 + function submitChangePassword() { + if (!checkPwd()) { + return false; + } + + $.ajax({ + url: '', + type: 'POST', + data: $('#modalLoginForm').serialize(), + dataType: 'json', + success: function(response) { + alert(response.message); + if (response.success) { + window.location.href = response.redirectUrl || ''; + } else { + $("input[name=changePassword]").val(''); + $("input[name=confirmPassword]").val(''); + $("input[name=changePassword]").trigger("focus"); + } + }, + error: function() { + alert("<%= localeMessage.getString("login.pwdchangefail") %>"); + } + }); + + return false; + } + $(document).ready(function() { $("input[name=userId]").keydown(function(event){ if ( event.which == 13 ) { @@ -276,12 +305,12 @@ }); $("input[name=changePassword]").keydown(function(event){ if ( event.which == 13 ) { - $('#modalLoginForm').submit(); + submitChangePassword(); } }); $("input[name=confirmPassword]").keydown(function(event){ if ( event.which == 13 ) { - $('#modalLoginForm').submit(); + submitChangePassword(); } }); // Password Change 링크로 직접 열 때만 초기화 (JS에서 modal('show') 호출 시 relatedTarget 없음) @@ -387,7 +416,7 @@ -
" method="post" onsubmit="return checkPwd()" novalidate> + " method="post" onsubmit="return submitChangePassword()" novalidate>