Merge remote-tracking branch 'origin/jenkins_with_weblogic' of C:/KJB_DEV/eapim-bundle/bundles/251210/eapim-portal_incremental_2025-11-15.bundle into jenkins_with_weblogic

This commit is contained in:
Rinjae
2025-12-10 15:42:37 +09:00
21 changed files with 3038 additions and 1420 deletions
@@ -6,6 +6,7 @@ import com.eactive.apim.portal.apps.user.dto.PortalUserDTO;
import com.eactive.apim.portal.apps.user.service.PortalUserAuthService; import com.eactive.apim.portal.apps.user.service.PortalUserAuthService;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@@ -79,7 +80,7 @@ public class AccountRecoveryController {
} }
try { try {
PortalUserDTO foundId = portalUserAuthService.findUsersByNameAndMobile(findIdDTO.getUserName(), findIdDTO.getMobileNumber()); List<PortalUserDTO> foundUsers = portalUserAuthService.findAllUsersByNameAndMobile(findIdDTO.getUserName(), findIdDTO.getMobileNumber());
// 인증 관련 세션 정보 제거 // 인증 관련 세션 정보 제거
session.removeAttribute("mobileNumber"); session.removeAttribute("mobileNumber");
@@ -87,7 +88,7 @@ public class AccountRecoveryController {
//redirect 가 아닌 경우에는 model 을 사용해서 페이지 렌더링 처리 //redirect 가 아닌 경우에는 model 을 사용해서 페이지 렌더링 처리
model.addAttribute("findIdDTO", findIdDTO); model.addAttribute("findIdDTO", findIdDTO);
model.addAttribute("foundId", foundId); model.addAttribute("foundUsers", foundUsers);
return ACCOUNT_RECOVERY_RESULT; return ACCOUNT_RECOVERY_RESULT;
} catch (UserNotFoundException e) { } catch (UserNotFoundException e) {
@@ -112,11 +113,20 @@ public class AccountRecoveryController {
// 세션에서 인증 여부 확인 // 세션에서 인증 여부 확인
Boolean isVerified = (Boolean) session.getAttribute("isVerified"); Boolean isVerified = (Boolean) session.getAttribute("isVerified");
String sessionMobileNumber = (String) session.getAttribute("mobileNumber");
if (isVerified == null || !isVerified) { if (isVerified == null || !isVerified) {
setModelForError(redirectAttributes, "resetPassword", null, "휴대폰 번호 인증을 먼저 진행해주세요.", null, passwordReset); setModelForError(redirectAttributes, "resetPassword", null, "휴대폰 번호 인증을 먼저 진행해주세요.", null, passwordReset);
return "redirect:/account_recovery?tab=resetPassword"; return "redirect:/account_recovery?tab=resetPassword";
} }
// 인증된 전화번호와 입력된 전화번호 일치 여부 확인
if (passwordReset.getMobileNumber() == null ||
!passwordReset.getMobileNumber().replace("-", "").equals(sessionMobileNumber)) {
setModelForError(redirectAttributes, "resetPassword", null, "인증된 휴대폰 번호와 입력한 번호가 일치하지 않습니다.", null, passwordReset);
return "redirect:/account_recovery?tab=resetPassword";
}
try { try {
// 사용자 정보 확인 // 사용자 정보 확인
portalUserAuthService.resetPassword( portalUserAuthService.resetPassword(
@@ -113,6 +113,7 @@ public class UserRegisterController {
@Valid @ModelAttribute("portalUser") PortalUserRegistrationDTO portalUserRegistrationDTO, @Valid @ModelAttribute("portalUser") PortalUserRegistrationDTO portalUserRegistrationDTO,
BindingResult bindingResult, BindingResult bindingResult,
HttpSession session, HttpSession session,
RedirectAttributes redirectAttributes,
Model model) { Model model) {
try { try {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@@ -135,10 +136,10 @@ public class UserRegisterController {
setModelForError(session, model, agreement, portalUserRegistrationDTO, response.getMessage()); setModelForError(session, model, agreement, portalUserRegistrationDTO, response.getMessage());
return MAIN_USER_REGISTER; return MAIN_USER_REGISTER;
} }
// 성공 시 // 성공 시 PRG 패턴 적용: 결과 페이지로 리다이렉트
session.removeAttribute("invitationToken"); session.removeAttribute("invitationToken");
model.addAttribute("message", "회원가입이 완료되었습니다."); redirectAttributes.addFlashAttribute("message", "회원가입이 완료되었습니다.");
return invitationToken != null ? MAIN_EMAIL_COMPLETED : MAIN_REGISTER_RESULT; return invitationToken != null ? "redirect:/signup/complete/corporate" : "redirect:/signup/complete";
} catch (Exception e) { } catch (Exception e) {
setModelForError(session, model, agreement, portalUserRegistrationDTO, setModelForError(session, model, agreement, portalUserRegistrationDTO,
"처리 중 오류가 발생했습니다: " + e.getMessage()); "처리 중 오류가 발생했습니다: " + e.getMessage());
@@ -146,6 +147,28 @@ public class UserRegisterController {
} }
} }
/**
* 개인회원 가입 완료 페이지
*/
@GetMapping("/signup/complete")
public String showRegistrationComplete(Model model) {
if (!model.containsAttribute("message")) {
return "redirect:/";
}
return MAIN_REGISTER_RESULT;
}
/**
* 법인회원 가입 완료 페이지
*/
@GetMapping("/signup/complete/corporate")
public String showCorporateRegistrationComplete(Model model) {
if (!model.containsAttribute("message")) {
return "redirect:/";
}
return MAIN_EMAIL_COMPLETED;
}
@GetMapping("/signup/decision") @GetMapping("/signup/decision")
public String showDecisionPage(@RequestParam(name = "invitation", required = false) String invitationToken, public String showDecisionPage(@RequestParam(name = "invitation", required = false) String invitationToken,
HttpSession session, HttpSession session,
@@ -232,6 +255,7 @@ public class UserRegisterController {
BindingResult bindingResult, BindingResult bindingResult,
@RequestParam(name = "invitationToken") String invitationToken, @RequestParam(name = "invitationToken") String invitationToken,
RedirectAttributes redirectAttributes, RedirectAttributes redirectAttributes,
HttpSession session,
Model model) { Model model) {
agreementValidator.validate(agreement, bindingResult); agreementValidator.validate(agreement, bindingResult);
@@ -253,6 +277,12 @@ public class UserRegisterController {
} else { } else {
ValidationResponse response = userRegisterFacade.processInvitation(action, invitation.get()); ValidationResponse response = userRegisterFacade.processInvitation(action, invitation.get());
// 초대 처리 완료 후 세션에서 초대 관련 속성 제거
session.removeAttribute("pendingInvitation");
session.removeAttribute("pendingInvitationToken");
session.removeAttribute("pendingInvitationOrgName");
session.removeAttribute("decisionToken");
redirectAttributes.addFlashAttribute("success", response.getMessage()); redirectAttributes.addFlashAttribute("success", response.getMessage());
return "redirect:/"; return "redirect:/";
} }
@@ -30,11 +30,9 @@ public class PortalOrgRegistrationDTO extends PortalUserRegistrationDTO {
private String orgName; private String orgName;
//대표자 성명 //대표자 성명
@NotEmpty(message = "{field.required}")
private String ceoName; private String ceoName;
//기관사업장소재지 //기관사업장소재지
@NotEmpty(message = "{field.required}")
private String orgAddr; private String orgAddr;
//기관업태 //기관업태
@@ -44,15 +42,12 @@ public class PortalOrgRegistrationDTO extends PortalUserRegistrationDTO {
private String orgIndustryType; private String orgIndustryType;
//서비스명 //서비스명
@NotEmpty(message = "{field.required}")
private String serviceName; private String serviceName;
//고객센터연락처 //고객센터연락처
@NotEmpty(message = "{field.required}")
private String scPhoneNumber; private String scPhoneNumber;
//기관전화번호 //기관전화번호
@NotEmpty(message = "{field.required}")
@PhoneNumber @PhoneNumber
private String orgPhoneNumber; private String orgPhoneNumber;
@@ -18,6 +18,16 @@ import com.eactive.apim.portal.template.entity.MessageRequest;
import com.eactive.apim.portal.template.repository.MessageRequestRepository; import com.eactive.apim.portal.template.repository.MessageRequestRepository;
import com.eactive.apim.portal.template.service.MessageHandlerService; import com.eactive.apim.portal.template.service.MessageHandlerService;
import com.eactive.apim.portal.template.service.MessageRecipient; import com.eactive.apim.portal.template.service.MessageRecipient;
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.apache.xerces.impl.dv.util.Base64; import org.apache.xerces.impl.dv.util.Base64;
import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority;
@@ -28,16 +38,6 @@ import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.List;
@Service @Service
@Transactional @Transactional
@RequiredArgsConstructor @RequiredArgsConstructor
@@ -73,17 +73,21 @@ public class PortalUserAuthService implements UserDetailsService {
} }
} }
public PortalUserDTO findUsersByNameAndMobile(String userName, String mobileNumber) { public List<PortalUserDTO> findAllUsersByNameAndMobile(String userName, String mobileNumber) {
try { try {
PortalUser user = portalUserRepository.findByUserNameAndMobileNumber(userName, mobileNumber); // 전화번호에서 - 제거하여 조회
if (user == null) { String normalizedMobileNumber = mobileNumber != null ? mobileNumber.replace("-", "") : null;
List<PortalUser> users = portalUserRepository.findAllByUserNameAndMobileNumber(userName, normalizedMobileNumber);
if (users == null || users.isEmpty()) {
throw new UserNotFoundException("입력하신 사용자 정보가 올바르지 않습니다. 다시 확인해 주세요."); throw new UserNotFoundException("입력하신 사용자 정보가 올바르지 않습니다. 다시 확인해 주세요.");
} }
PortalUserDTO dto = portalUserMapper.toDTO(user);
dto.setMaskedEmailAddr(StringMaskingUtil.maskEmail(dto.getLoginId()));
dto.setLoginId(null); return users.stream().map(user -> {
return dto; PortalUserDTO dto = portalUserMapper.toDTO(user);
dto.setMaskedEmailAddr(StringMaskingUtil.maskEmail(dto.getLoginId()));
dto.setLoginId(null);
return dto;
}).collect(Collectors.toList());
} catch (UserNotFoundException e) { } catch (UserNotFoundException e) {
throw e; throw e;
@@ -97,11 +101,12 @@ public class PortalUserAuthService implements UserDetailsService {
} }
public void resetPassword(String loginId, String userName, String mobileNumber) { public void resetPassword(String loginId, String userName, String mobileNumber) {
// 전화번호에서 - 제거하여 정규화
String normalizedMobileNumber = mobileNumber != null ? mobileNumber.replace("-", "") : null;
PortalUser portalUser = portalUserRepository.findByLoginIdAndUserNameAndMobileNumber(loginId, userName, mobileNumber) PortalUser portalUser = portalUserRepository.findByLoginIdAndUserNameAndMobileNumber(loginId, userName, normalizedMobileNumber)
.orElseThrow(() -> new UserNotFoundException("일치하는 사용자 정보를 찾을 수 없습니다.")); .orElseThrow(() -> new UserNotFoundException("일치하는 사용자 정보를 찾을 수 없습니다."));
// String tempPassword = EncryptionUtil.generateNewPasswordForKjbank(loginId);
String tempPassword = EncryptionUtil.generateNewPassword(); String tempPassword = EncryptionUtil.generateNewPassword();
portalUser.setPasswordHash(passwordEncoder.encode(tempPassword)); portalUser.setPasswordHash(passwordEncoder.encode(tempPassword));
if ("Y".equalsIgnoreCase(portalUser.getAccountLockYn())) { if ("Y".equalsIgnoreCase(portalUser.getAccountLockYn())) {
@@ -24,17 +24,26 @@ public class UserRegistrationValidationService {
} }
private boolean isValidOrgInfo(PortalOrgRegistrationDTO orgDTO) { private boolean isValidOrgInfo(PortalOrgRegistrationDTO orgDTO) {
return basicValidationService.isValidBusinessNumber(orgDTO.getCompRegNo()) && // 사업자등록번호, 법인등록번호는 필수
basicValidationService.isValidCorpRegNo(orgDTO.getCorpRegNo()) && if (!basicValidationService.isValidBusinessNumber(orgDTO.getCompRegNo()) ||
basicValidationService.isValidPhoneNumber(orgDTO.getOrgPhoneNumber()) && !basicValidationService.isValidCorpRegNo(orgDTO.getCorpRegNo())) {
basicValidationService.isValidPhoneNumber(orgDTO.getScPhoneNumber()); return false;
}
// 회사 전화번호, 고객센터 전화번호는 선택 (입력된 경우에만 형식 검증)
if (basicValidationService.isNotEmpty(orgDTO.getOrgPhoneNumber()) &&
!basicValidationService.isValidPhoneNumber(orgDTO.getOrgPhoneNumber())) {
return false;
}
if (basicValidationService.isNotEmpty(orgDTO.getScPhoneNumber()) &&
!basicValidationService.isValidPhoneNumber(orgDTO.getScPhoneNumber())) {
return false;
}
return true;
} }
private boolean isValidRequiredFields(PortalOrgRegistrationDTO orgDTO) { private boolean isValidRequiredFields(PortalOrgRegistrationDTO orgDTO) {
return basicValidationService.isNotEmpty(orgDTO.getOrgName()) && // 법인명만 필수, 나머지(대표자 성명, 소재지, 서비스명)는 선택
basicValidationService.isNotEmpty(orgDTO.getCeoName()) && return basicValidationService.isNotEmpty(orgDTO.getOrgName());
basicValidationService.isNotEmpty(orgDTO.getOrgAddr()) &&
basicValidationService.isNotEmpty(orgDTO.getServiceName());
} }
private boolean isValidIpWhitelistIfExists(PortalOrgRegistrationDTO orgDTO) { private boolean isValidIpWhitelistIfExists(PortalOrgRegistrationDTO orgDTO) {
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@ const customPopups = {
*/ */
showAlert: function (message, callback) { showAlert: function (message, callback) {
// 메시지 설정 // 메시지 설정
$('#customAlertMessage').text(message); $('#customAlertMessage').html(message);
// 팝업 표시 (modal 구조 사용) // 팝업 표시 (modal 구조 사용)
$('#customAlert').show(); $('#customAlert').show();
@@ -102,7 +102,7 @@ const customPopups = {
// 팝업 내용 설정 // 팝업 내용 설정
$('#passwordPopupTitle').text(title); $('#passwordPopupTitle').text(title);
$('#passwordPopupMessage').text(message); $('#passwordPopupMessage').html(message);
// 입력 필드 및 에러 초기화 // 입력 필드 및 에러 초기화
$('#passwordPopupInput').val('').removeClass('error'); $('#passwordPopupInput').val('').removeClass('error');
@@ -216,7 +216,7 @@ const customPopups = {
*/ */
showConfirm: function (message, callback) { showConfirm: function (message, callback) {
// 메시지 설정 // 메시지 설정
$('#customConfirmMessage').text(message); $('#customConfirmMessage').html(message);
// 팝업 표시 (modal 구조 사용) // 팝업 표시 (modal 구조 사용)
$('#customConfirm').show(); $('#customConfirm').show();
@@ -302,7 +302,7 @@ const customPopups = {
$(document).off('keydown.customConfirmEsc'); $(document).off('keydown.customConfirmEsc');
}, },
showEmailValidationPopup: function (message, onConvertCallback, onChangeEmailCallback) { showEmailValidationPopup: function (message, onConvertCallback, onChangeEmailCallback) {
$('#emailValidationPopupMessage').text(message); $('#emailValidationPopupMessage').html(message);
$('#emailValidationPopup').css('display', 'flex'); $('#emailValidationPopup').css('display', 'flex');
$('#emailConvertButton').one('click', function () { $('#emailConvertButton').one('click', function () {
@@ -320,7 +320,7 @@ const customPopups = {
}); });
}, },
showEmailResendPopup: function (message, loginId) { showEmailResendPopup: function (message, loginId) {
$('#emailResendMessage').text(message); $('#emailResendMessage').html(message);
$('#userLoginId').val(loginId); $('#userLoginId').val(loginId);
$('#emailResend').show(); $('#emailResend').show();
}, },
@@ -1,26 +1,26 @@
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Account Recovery Page Styles (Find ID / Reset Password) - Modern Design // Account Recovery Page Styles (Find ID / Reset Password) - Figma: 1029-2249
// Matches login.html design system for consistency // Matches terms_agreements.html tab design for consistency
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
.account-recovery-page { .account-recovery-page {
display: flex; display: flex;
align-items: center; align-items: flex-start;
justify-content: center; justify-content: center;
background: #EDF9FE; background: transparent;
padding: 40px 20px; padding: 0;
position: relative; position: relative;
min-height: calc(100vh - 200px); min-height: auto;
margin-top: 60px; margin: 0;
margin-bottom: 60px;
border-radius: 12px;
} }
.account-recovery-container { .account-recovery-container {
width: 100%; width: 100%;
max-width: 540px; max-width: 1228px;
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;
padding: $spacing-lg
;
} }
.account-recovery-card { .account-recovery-card {
@@ -28,7 +28,7 @@
padding: 0; padding: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: stretch;
position: relative; position: relative;
@media (max-width: 576px) { @media (max-width: 576px) {
@@ -36,72 +36,66 @@
} }
} }
// Logo // Logo - 숨김 처리 (Figma 디자인에 없음)
.account-recovery-logo { .account-recovery-logo {
width: 90px; display: none;
height: 90px;
margin-bottom: 24px;
img {
width: 100%;
height: 100%;
object-fit: contain;
}
} }
// Title // Title - 숨김 처리 (페이지 타이틀 배너에서 표시)
.account-recovery-title { .account-recovery-title {
font-family: 'Noto Sans KR', sans-serif; display: none;
font-size: 28px;
font-weight: 700;
color: #000000;
text-align: center;
margin: 0 0 32px 0;
line-height: 1.3;
@media (max-width: 576px) {
font-size: 24px;
margin-bottom: 24px;
}
} }
// Tab Navigation // Tab Navigation (Figma 디자인: 약관 페이지와 동일)
.account-recovery-tabs { .account-recovery-tabs {
display: flex; display: flex;
gap: 0; gap: 0;
margin-bottom: 40px; margin-bottom: 0;
width: 100%; width: 100%;
background: #F8F9FA; background: transparent;
border-radius: 12px; border-radius: 0;
padding: 4px; padding: 0;
.tab-link { .tab-link {
flex: 1; flex: 1;
padding: 14px 24px; display: flex;
align-items: center;
justify-content: center;
padding: 18px 24px;
font-family: 'Noto Sans KR', sans-serif; font-family: 'Noto Sans KR', sans-serif;
font-size: 16px; font-size: 22px;
font-weight: 600; font-weight: 700;
color: #64748B; color: #8c959f;
text-decoration: none; text-decoration: none;
text-align: center; text-align: center;
background: transparent; background: #eceff4;
border-radius: 8px; border-radius: 0;
transition: all 0.3s ease; transition: all 0.3s ease;
// 왼쪽 탭 둥근 모서리
&:first-child {
border-radius: 30px 0 0 0;
}
// 오른쪽 탭 둥근 모서리
&:last-child {
border-radius: 0 30px 0 0;
}
&:hover { &:hover {
color: #0049B4; color: #3ba4ed;
background: rgba(0, 73, 180, 0.05); background: #e4e8ed;
} }
&.active { &.active {
color: #FFFFFF; color: #FFFFFF;
background: #0049B4; background: #3ba4ed;
box-shadow: 0 2px 4px rgba(0, 73, 180, 0.2); font-weight: 700;
} }
@media (max-width: 576px) { @media (max-width: 576px) {
padding: 12px 16px; padding: 14px 16px;
font-size: 15px; font-size: 16px;
} }
} }
} }
@@ -143,53 +137,82 @@
} }
} }
// Form // Form Content Area (Figma: 아이디찾기BG_box)
.account-recovery-form { .account-recovery-form {
width: 100%; width: 100%;
margin-bottom: 0; margin-bottom: 0;
background: #F6F9FB;
padding: 40px;
border-radius: 0 0 12px 12px;
@media (max-width: 576px) {
padding: 24px 16px;
}
.form-group { .form-group {
margin-bottom: 24px; display: flex;
align-items: center;
gap: 20px;
margin-bottom: 20px;
&:last-of-type { &:last-of-type {
margin-bottom: 0; margin-bottom: 0;
} }
@media (max-width: 768px) {
flex-direction: column;
align-items: stretch;
gap: 10px;
}
} }
.form-label { .form-label {
display: block; display: flex;
align-items: center;
flex-shrink: 0;
width: 170px;
font-family: 'Noto Sans KR', sans-serif; font-family: 'Noto Sans KR', sans-serif;
font-size: 15px; font-size: 20px;
font-weight: 600; font-weight: 400;
color: #1A1A2E; color: #212529;
margin-bottom: 10px; margin-bottom: 0;
.required {
color: #ed5b5b;
margin-left: 2px;
}
@media (max-width: 768px) {
width: 100%;
font-size: 16px;
}
} }
.form-input { .form-input {
width: 100%; flex: 1;
height: 70px; height: 60px;
padding: 0 24px; padding: 0 20px;
font-family: 'Noto Sans KR', sans-serif; font-family: 'Noto Sans KR', sans-serif;
font-size: 16px; font-size: 20px;
font-weight: 400; font-weight: 400;
color: #1A1A2E; color: #212529;
background: #FFFFFF; background: #FFFFFF;
border: 1px solid #DDDDDD; border: 1px solid #dadada;
border-radius: 12px; border-radius: 12px;
outline: none; outline: none;
transition: all 0.3s ease; transition: all 0.3s ease;
&::placeholder { &::placeholder {
color: #94A3B8; color: #dadada;
} }
&:hover { &:hover {
border-color: #CBD5E1; border-color: #3ba4ed;
} }
&:focus { &:focus {
border-color: #0049B4; border-color: #3ba4ed;
box-shadow: 0 0 0 4px rgba(0, 73, 180, 0.08); box-shadow: 0 0 0 2px rgba(59, 164, 237, 0.1);
} }
&:disabled { &:disabled {
@@ -200,37 +223,43 @@
} }
&.error { &.error {
border-color: #FF6B6B; border-color: #ed5b5b;
}
@media (max-width: 576px) {
height: 50px;
font-size: 16px;
} }
} }
.form-select { .form-select {
width: 100%; height: 60px;
height: 70px; padding: 0 40px 0 20px;
padding: 0 24px;
font-family: 'Noto Sans KR', sans-serif; font-family: 'Noto Sans KR', sans-serif;
font-size: 16px; font-size: 20px;
font-weight: 400; font-weight: 400;
color: #1A1A2E; color: #515151;
background: #FFFFFF; background: #FFFFFF;
border: 1px solid #DDDDDD; border: 1px solid #dadada;
border-radius: 12px; border-radius: 12px;
outline: none; outline: none;
cursor: pointer; cursor: pointer;
transition: all 0.3s ease; transition: all 0.3s ease;
appearance: none; appearance: none;
background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); -webkit-appearance: none;
-moz-appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5' viewBox='0 0 10 5'%3E%3Cpath fill='%231D1B20' d='M5 5L0 0h10z'/%3E%3C/svg%3E");
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: right 24px center; background-position: right 16px center;
padding-right: 50px; background-size: 10px 5px;
&:hover { &:hover {
border-color: #CBD5E1; border-color: #3ba4ed;
} }
&:focus { &:focus {
border-color: #0049B4; border-color: #3ba4ed;
box-shadow: 0 0 0 4px rgba(0, 73, 180, 0.08); box-shadow: 0 0 0 2px rgba(59, 164, 237, 0.1);
} }
&:disabled { &:disabled {
@@ -245,95 +274,130 @@
padding: 12px; padding: 12px;
font-size: 16px; font-size: 16px;
} }
@media (max-width: 576px) {
height: 50px;
font-size: 16px;
}
} }
} }
// Phone Input Group // Phone Input Group (Figma: 휴대폰번호+텍스트필드)
.phone-input-group { .phone-input-group {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 12px; gap: 14px;
flex: 1;
.phone-prefix { .phone-prefix {
flex: 0 0 140px; width: 180px;
flex-shrink: 0;
} }
.phone-middle, .phone-middle,
.phone-last { .phone-last {
flex: 1; width: 180px;
flex-shrink: 0;
} }
.phone-separator { .phone-separator {
font-size: 16px; display: flex;
color: #64748B; align-items: center;
font-weight: 500; justify-content: center;
width: 14px;
height: 1px;
background: #515151;
flex-shrink: 0;
} }
@media (max-width: 576px) { @media (max-width: 768px) {
.phone-prefix { flex-wrap: wrap;
flex: 0 0 110px; gap: 10px;
.phone-prefix,
.phone-middle,
.phone-last {
width: calc(33% - 20px);
min-width: 80px;
} }
.phone-separator { .phone-separator {
font-size: 14px; width: 10px;
}
}
@media (max-width: 576px) {
.phone-prefix,
.phone-middle,
.phone-last {
width: 100%;
}
.phone-separator {
display: none;
} }
} }
} }
// Auth Number Group // Auth Number Group (Figma: 인증번호+텍스트필드)
.auth-number-group { .auth-number-group {
margin-top: 24px; margin-top: 0;
} }
.auth-input-group { .auth-input-group {
position: relative; position: relative;
display: flex;
align-items: center;
flex: 1;
.auth-input { .auth-input {
padding-right: 100px; flex: 1;
padding-right: 80px;
} }
.auth-timer { .auth-timer {
position: absolute; position: absolute;
right: 24px; right: 20px;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
font-family: 'Noto Sans KR', sans-serif; font-family: 'Noto Sans KR', sans-serif;
font-size: 16px; font-size: 20px;
font-weight: 600; font-weight: 400;
color: #FF6B6B; color: #ed5b5b;
pointer-events: none; pointer-events: none;
@media (max-width: 576px) { @media (max-width: 576px) {
font-size: 14px; font-size: 16px;
right: 16px; right: 16px;
} }
} }
} }
// Buttons // Buttons (Figma: 인증번호 받기/확인)
.auth-request-button, .auth-request-button,
.auth-verify-button { .auth-verify-button {
width: 100%; width: 172px;
height: 70px; height: 60px;
padding: 0 32px; padding: 10px;
font-family: 'Noto Sans KR', sans-serif; font-family: 'Noto Sans KR', sans-serif;
font-size: 17px; font-size: 18px;
font-weight: 700; font-weight: 700;
color: #FFFFFF; color: #FFFFFF;
background: #0049B4; background: #a4d6ea;
border: none; border: none;
border-radius: 12px; border-radius: 12px;
cursor: pointer; cursor: pointer;
transition: all 0.3s ease; transition: all 0.3s ease;
margin-top: 16px; margin: 0;
flex-shrink: 0;
line-height: 1; line-height: 1;
&:hover { &:hover {
background: darken(#0049B4, 5%); background: darken(#a4d6ea, 5%);
} }
&:active { &:active {
background: darken(#0049B4, 10%); background: darken(#a4d6ea, 10%);
} }
&:disabled { &:disabled {
@@ -342,49 +406,53 @@
} }
@media (max-width: 576px) { @media (max-width: 576px) {
height: 60px; width: 100%;
height: 50px;
font-size: 16px; font-size: 16px;
margin-top: 10px;
} }
} }
// Form Actions - Account Recovery specific styles // Form Actions (Figma: btn_취소, btn_신청)
// Scoped to avoid conflict with common .form-actions in _forms.scss
.account-recovery-card .form-actions { .account-recovery-card .form-actions {
display: flex; display: flex;
gap: 12px; justify-content: center;
margin-top: 32px; gap: 20px;
padding-top: 0; margin-top: 40px;
padding: 40px 0;
border-top: none; border-top: none;
background: transparent;
.cancel-button, .cancel-button,
.submit-button { .submit-button {
flex: 1; width: 200px;
height: 70px; height: 60px;
padding: 0 32px; padding: 10px;
font-family: 'Noto Sans KR', sans-serif; font-family: 'Noto Sans KR', sans-serif;
font-size: 17px; font-size: 18px;
font-weight: 700; font-weight: 700;
border: none; border: none;
border-radius: 12px; border-radius: 12px;
cursor: pointer; cursor: pointer;
transition: all 0.3s ease; transition: all 0.3s ease;
line-height: 1; line-height: 1;
// <a> 태그 지원
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
} }
.cancel-button { .cancel-button {
color: #64748B; color: #5f666c;
background: #FFFFFF; background: #e5e7eb;
border: 2px solid #E2E8F0;
&:hover { &:hover {
background: #F8F9FA; background: darken(#e5e7eb, 5%);
border-color: #CBD5E1;
color: #475569;
} }
&:active { &:active {
background: #F1F5F9; background: darken(#e5e7eb, 10%);
border-color: #94A3B8;
} }
} }
@@ -409,10 +477,12 @@
@media (max-width: 576px) { @media (max-width: 576px) {
flex-direction: column; flex-direction: column;
gap: 12px; gap: 12px;
padding: 24px 0;
.cancel-button, .cancel-button,
.submit-button { .submit-button {
height: 60px; width: 100%;
height: 50px;
font-size: 16px; font-size: 16px;
} }
} }
@@ -511,3 +581,163 @@
margin-top: 24px; margin-top: 24px;
} }
} }
// Result Page Styles (아이디 찾기 결과 페이지)
.account-recovery-result {
width: 100%;
background: #F6F9FB;
padding: 60px 40px;
border-radius: 0 0 12px 12px;
text-align: center;
@media (max-width: 576px) {
padding: 40px 20px;
}
.result-header {
margin-bottom: 40px;
.result-icon {
font-size: 60px;
color: #6BCF7F;
margin-bottom: 20px;
display: block;
@media (max-width: 576px) {
font-size: 48px;
}
}
.result-title {
font-family: 'Noto Sans KR', sans-serif;
font-size: 24px;
font-weight: 700;
color: #212529;
margin-bottom: 12px;
@media (max-width: 576px) {
font-size: 20px;
}
}
.result-description {
font-family: 'Noto Sans KR', sans-serif;
font-size: 16px;
font-weight: 400;
color: #5f666c;
margin: 0;
strong {
color: #0049B4;
font-weight: 700;
}
@media (max-width: 576px) {
font-size: 14px;
}
}
}
}
// Found Users List
.found-users-list {
max-width: 600px;
margin: 0 auto 40px;
.found-user-item {
background: #FFFFFF;
border: 1px solid #dadada;
border-radius: 12px;
padding: 20px 24px;
margin-bottom: 12px;
transition: all 0.3s ease;
&:last-child {
margin-bottom: 0;
}
&:hover {
border-color: #3ba4ed;
box-shadow: 0 2px 8px rgba(59, 164, 237, 0.15);
}
.user-info {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
flex-wrap: wrap;
@media (max-width: 576px) {
flex-direction: column;
gap: 6px;
}
}
.user-email {
font-family: 'Noto Sans KR', sans-serif;
font-size: 20px;
font-weight: 700;
color: #212529;
@media (max-width: 576px) {
font-size: 18px;
}
}
.user-date {
font-family: 'Noto Sans KR', sans-serif;
font-size: 16px;
font-weight: 400;
color: #8c959f;
@media (max-width: 576px) {
font-size: 14px;
}
}
}
}
// Result Info Box
.result-info-box {
max-width: 600px;
margin: 0 auto;
background: rgba(0, 73, 180, 0.05);
border: 1px solid rgba(0, 73, 180, 0.2);
border-radius: 12px;
padding: 16px 24px;
.info-text {
font-family: 'Noto Sans KR', sans-serif;
font-size: 15px;
font-weight: 400;
color: #5f666c;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
flex-wrap: wrap;
i {
color: #0049B4;
font-size: 16px;
}
.info-link {
color: #0049B4;
font-weight: 700;
text-decoration: underline;
transition: color 0.3s ease;
&:hover {
color: darken(#0049B4, 10%);
}
}
@media (max-width: 576px) {
font-size: 14px;
text-align: center;
}
}
}
@@ -1,35 +1,33 @@
<!doctype html> <!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/kjbank_base_layout}"> xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/kjbank_title_layout}">
<body> <body>
<section layout:fragment="title">
<div class="page-title-banner">
<img th:src="@{/img/img_title_bg.png}" class="title-image">
<h1>아이디 찾기</h1>
</div>
</section>
<th:block layout:fragment="contentFragment"> <th:block layout:fragment="contentFragment">
<div class="account-recovery-page"> <div class="account-recovery-page">
<div class="account-recovery-container"> <div class="account-recovery-container">
<div class="account-recovery-card"> <div class="account-recovery-card">
<!-- Logo --> <!-- Tab Navigation (Figma 디자인: 약관 페이지와 동일) -->
<div class="account-recovery-logo">
<img th:src="@{/img/logo/logo_box.png}" alt="광주은행">
</div>
<!-- Header Title -->
<h2 class="account-recovery-title">아이디 찾기</h2>
<!-- Tab Navigation -->
<div class="account-recovery-tabs"> <div class="account-recovery-tabs">
<a href="#" class="tab-link active">아이디 찾기</a> <a href="#" class="tab-link active">아이디찾기</a>
<a th:href="@{/account_recovery(tab='resetPassword')}" class="tab-link">비밀번호 초기화</a> <a th:href="@{/account_recovery(tab='resetPassword')}" class="tab-link">비밀번호 초기화</a>
</div> </div>
<!-- Alert Messages --> <!-- Alert Messages -->
<div id="alertContainer"></div> <div id="alertContainer"></div>
<!-- Account Recovery Form --> <!-- Account Recovery Form (Figma: 아이디찾기BG_box) -->
<form id="accountForm" role="form" name="accountForm" th:action="@{/find_id}" method="post" class="account-recovery-form"> <form id="accountForm" role="form" name="accountForm" th:action="@{/find_id}" method="post" class="account-recovery-form">
<input type="hidden" id="mobileNumber" name="mobileNumber" th:value="${mobileNumber}"> <input type="hidden" id="mobileNumber" name="mobileNumber" th:value="${mobileNumber}">
<!-- Name Field --> <!-- Name Field (Figma: 성명 + 텍스트필드) -->
<div class="form-group"> <div class="form-group">
<label for="userName" class="form-label">성명</label> <label for="userName" class="form-label">성명<span class="required">*</span></label>
<input type="text" <input type="text"
id="userName" id="userName"
name="userName" name="userName"
@@ -39,9 +37,9 @@
required> required>
</div> </div>
<!-- Phone Number Fields --> <!-- Phone Number Fields (Figma: 휴대폰번호 + 텍스트필드) -->
<div class="form-group"> <div class="form-group">
<label class="form-label">휴대폰 번호</label> <label class="form-label">휴대폰 번호<span class="required">*</span></label>
<div class="phone-input-group"> <div class="phone-input-group">
<select id="phonePrefix" class="form-select phone-prefix" required> <select id="phonePrefix" class="form-select phone-prefix" required>
<option value="">선택</option> <option value="">선택</option>
@@ -51,37 +49,35 @@
<option value="017">017</option> <option value="017">017</option>
<option value="018">018</option> <option value="018">018</option>
</select> </select>
<span class="phone-separator">-</span> <span class="phone-separator"></span>
<input type="tel" <input type="tel"
id="phoneMiddle" id="phoneMiddle"
name="phoneMiddle" name="phoneMiddle"
maxlength="4" maxlength="4"
class="form-input phone-middle" class="form-input phone-middle"
placeholder="0000" placeholder="1234"
pattern="[0-9]*" pattern="[0-9]*"
inputmode="numeric" inputmode="numeric"
required> required>
<span class="phone-separator">-</span> <span class="phone-separator"></span>
<input type="tel" <input type="tel"
id="phoneLast" id="phoneLast"
name="phoneLast" name="phoneLast"
maxlength="4" maxlength="4"
class="form-input phone-last" class="form-input phone-last"
placeholder="0000" placeholder="1234"
pattern="[0-9]*" pattern="[0-9]*"
inputmode="numeric" inputmode="numeric"
required> required>
<button type="button" class="auth-request-button" id="requestAuthButton">
인증번호 받기
</button>
</div> </div>
</div> </div>
<!-- Auth Number Request Button --> <!-- Auth Number Input (Figma: 인증번호 입력 + 텍스트필드) -->
<button type="button" class="auth-request-button" id="requestAuthButton">
인증번호 받기
</button>
<!-- Auth Number Input -->
<div class="form-group auth-number-group" id="authNumberGroup" style="display: none;"> <div class="form-group auth-number-group" id="authNumberGroup" style="display: none;">
<label for="authNumber" class="form-label">인증번호 입력</label> <label for="authNumber" class="form-label">인증번호 입력<span class="required">*</span></label>
<div class="auth-input-group"> <div class="auth-input-group">
<input type="text" <input type="text"
id="authNumber" id="authNumber"
@@ -94,20 +90,18 @@
required> required>
<span class="auth-timer" id="authTimer">03:00</span> <span class="auth-timer" id="authTimer">03:00</span>
</div> </div>
</div> <button type="button" class="auth-verify-button" id="verifyAuthButton">
인증번호 확인
<!-- Auth Number Verify Button --> </button>
<button type="button" class="auth-verify-button" id="verifyAuthButton" style="display: none;">
인증번호 확인
</button>
<!-- Submit Buttons -->
<div class="form-actions">
<button type="button" class="cancel-button" id="cancelButton">취소</button>
<button type="submit" class="submit-button" id="submitButton">아이디 찾기</button>
</div> </div>
</form> </form>
<!-- Submit Buttons (Figma: btn_취소, btn_신청) -->
<div class="form-actions">
<button type="button" class="cancel-button" id="cancelButton">취소</button>
<button type="submit" class="submit-button" id="submitButton" form="accountForm">아이디 찾기</button>
</div>
<!-- Loading State --> <!-- Loading State -->
<div class="loading-overlay" id="loadingOverlay"> <div class="loading-overlay" id="loadingOverlay">
<div class="spinner"></div> <div class="spinner"></div>
@@ -122,32 +116,15 @@
$(document).ready(function() { $(document).ready(function() {
const errorMsg = [[${error}]]; const errorMsg = [[${error}]];
if (errorMsg) { if (errorMsg) {
showAlert(errorMsg, 'error'); customPopups.showAlert(errorMsg, 'error');
} }
const paramError = new URL(window.location.href).searchParams.get('error'); const paramError = new URL(window.location.href).searchParams.get('error');
if (paramError) { if (paramError) {
showAlert(decodeURIComponent(paramError), 'error'); customPopups.showAlert(decodeURIComponent(paramError), 'error');
} }
}); });
// Alert 표시 함수
function showAlert(message, type = 'info') {
const alertContainer = $('#alertContainer');
const alertClass = type === 'error' ? 'alert-error' : type === 'success' ? 'alert-success' : 'alert-info';
const iconClass = type === 'error' ? 'fa-exclamation-circle' : type === 'success' ? 'fa-check-circle' : 'fa-info-circle';
const alertHtml = `
<div class="account-alert ${alertClass}">
<i class="fas ${iconClass}"></i>
<span>${message}</span>
</div>
`;
alertContainer.html(alertHtml);
setTimeout(() => alertContainer.empty(), 5000);
}
// 휴대폰 번호 결합 함수 // 휴대폰 번호 결합 함수
function combineMobileNumber() { function combineMobileNumber() {
const prefix = $('#phonePrefix').val(); const prefix = $('#phonePrefix').val();
@@ -175,7 +152,7 @@
if (remainingTime <= 0) { if (remainingTime <= 0) {
clearInterval(countdownInterval); clearInterval(countdownInterval);
$('#authTimer').text('시간 초과').css('color', '#FF6B6B'); $('#authTimer').text('시간 초과').css('color', '#FF6B6B');
showAlert('입력 시간이 초과되었습니다. 인증번호를 다시 발송해주세요.', 'error'); customPopups.showAlert('입력 시간이 초과되었습니다. 인증번호를 다시 발송해주세요.', 'error');
// 필드 활성화 // 필드 활성화
$('#phonePrefix, #phoneMiddle, #phoneLast').prop('disabled', false); $('#phonePrefix, #phoneMiddle, #phoneLast').prop('disabled', false);
@@ -198,7 +175,7 @@
const mobileNumber = combineMobileNumber(); const mobileNumber = combineMobileNumber();
if (!mobileNumber) { if (!mobileNumber) {
showAlert('휴대폰 번호를 올바르게 입력해주세요.', 'error'); customPopups.showAlert('휴대폰 번호를 올바르게 입력해주세요.', 'error');
return; return;
} }
@@ -216,7 +193,7 @@
$('#loadingOverlay').fadeOut(200); $('#loadingOverlay').fadeOut(200);
if (response.valid) { if (response.valid) {
showAlert(response.message || '인증번호가 발송되었습니다.', 'success'); customPopups.showAlert(response.message || '인증번호가 발송되었습니다.', 'success');
// 휴대폰 번호 필드 비활성화 // 휴대폰 번호 필드 비활성화
$('#phonePrefix, #phoneMiddle, #phoneLast').prop('disabled', true); $('#phonePrefix, #phoneMiddle, #phoneLast').prop('disabled', true);
@@ -229,12 +206,12 @@
isAuthNumberRequested = true; isAuthNumberRequested = true;
startAuthTimer(); startAuthTimer();
} else { } else {
showAlert(response.message || '인증번호 발송에 실패했습니다.', 'error'); customPopups.showAlert(response.message || '인증번호 발송에 실패했습니다.', 'error');
} }
}, },
error: function() { error: function() {
$('#loadingOverlay').fadeOut(200); $('#loadingOverlay').fadeOut(200);
showAlert('처리 중 오류가 발생했습니다. 다시 시도해주세요.', 'error'); customPopups.showAlert('처리 중 오류가 발생했습니다. 다시 시도해주세요.', 'error');
} }
}); });
}); });
@@ -242,14 +219,14 @@
// 인증번호 확인 버튼 // 인증번호 확인 버튼
$('#verifyAuthButton').on('click', function() { $('#verifyAuthButton').on('click', function() {
if (!isAuthNumberRequested) { if (!isAuthNumberRequested) {
showAlert('휴대폰 번호 인증을 먼저 진행해주세요.', 'error'); customPopups.showAlert('휴대폰 번호 인증을 먼저 진행해주세요.', 'error');
return; return;
} }
const authNumber = $('#authNumber').val().trim(); const authNumber = $('#authNumber').val().trim();
if (authNumber.length !== 6) { if (authNumber.length !== 6) {
showAlert('인증번호 6자리를 입력해주세요.', 'error'); customPopups.showAlert('인증번호 6자리를 입력해주세요.', 'error');
return; return;
} }
@@ -268,7 +245,7 @@
$('#loadingOverlay').fadeOut(200); $('#loadingOverlay').fadeOut(200);
if (response.valid) { if (response.valid) {
showAlert(response.message || '인증이 완료되었습니다.', 'success'); customPopups.showAlert(response.message || '인증이 완료되었습니다.', 'success');
// 인증번호 입력 필드 비활성화 // 인증번호 입력 필드 비활성화
$('#authNumber').prop('disabled', true); $('#authNumber').prop('disabled', true);
@@ -279,12 +256,12 @@
isAuthVerified = true; isAuthVerified = true;
} else { } else {
showAlert(response.message || '인증번호가 일치하지 않습니다.', 'error'); customPopups.showAlert(response.message || '인증번호가 일치하지 않습니다.', 'error');
} }
}, },
error: function() { error: function() {
$('#loadingOverlay').fadeOut(200); $('#loadingOverlay').fadeOut(200);
showAlert('처리 중 오류가 발생했습니다. 다시 시도해주세요.', 'error'); customPopups.showAlert('처리 중 오류가 발생했습니다. 다시 시도해주세요.', 'error');
} }
}); });
}); });
@@ -295,23 +272,23 @@
const userName = $('#userName').val().trim(); const userName = $('#userName').val().trim();
if (!userName) { if (!userName) {
showAlert('성명을 입력해주세요.', 'error'); customPopups.showAlert('성명을 입력해주세요.', 'error');
return; return;
} }
const mobileNumber = combineMobileNumber(); const mobileNumber = combineMobileNumber();
if (!mobileNumber) { if (!mobileNumber) {
showAlert('휴대폰 번호를 올바르게 입력해주세요.', 'error'); customPopups.showAlert('휴대폰 번호를 올바르게 입력해주세요.', 'error');
return; return;
} }
if (!isAuthNumberRequested) { if (!isAuthNumberRequested) {
showAlert('휴대폰 인증을 먼저 진행해주세요.', 'error'); customPopups.showAlert('휴대폰 인증을 먼저 진행해주세요.', 'error');
return; return;
} }
if (!isAuthVerified) { if (!isAuthVerified) {
showAlert('휴대폰 인증을 완료해주세요.', 'error'); customPopups.showAlert('휴대폰 인증을 완료해주세요.', 'error');
return; return;
} }
@@ -1,43 +1,65 @@
<!doctype html> <!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/kbank_base_layout}"> xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/kjbank_title_layout}">
<body> <body>
<section layout:fragment="contentFragment" class="content"> <section layout:fragment="title">
<div class="content_wrap"> <div class="page-title-banner">
<!-- 타이틀 --> <img th:src="@{/img/img_title_bg.png}" class="title-image">
<div class="sub_title2" id="title-find-id"> <h1>아이디 찾기</h1>
<h2 class="title add5">아이디 찾기</h2> </div>
</div>
<div class="inner i_cs10 h_inner2">
<!-- 탭 메뉴 -->
<div class="tab-wrap">
<div class="tabs">
<div class="tab active" id="tab1">
<div class="form_type">
<div class="result_view">
<p class="title">회원님의 아이디는 아래와 같습니다.</p>
<ul>
<li>
<span th:text="${foundId.maskedEmailAddr}"></span>
<th:block th:text="'(' + ${#temporals.format(foundId.createdDate, 'yyyy.MM.dd.')} + ' 가입)'"></th:block>
</li>
</ul>
<div class="result_info_box">
<p class="infor">비밀번호가 기억나지 않는 경우에는 <span><a href="/account_recovery?tab=resetPassword">비밀번호 초기화</a></span>를 이용해 주세요.</p>
</div>
</div>
<div class="btn_application btn_top3">
<a href="/login" class="common-btnType-1"><span>로그인</span></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section> </section>
<th:block layout:fragment="contentFragment">
<div class="account-recovery-page">
<div class="account-recovery-container">
<div class="account-recovery-card">
<!-- Tab Navigation -->
<div class="account-recovery-tabs">
<a href="#" class="tab-link active">아이디찾기</a>
<a th:href="@{/account_recovery(tab='resetPassword')}" class="tab-link">비밀번호 초기화</a>
</div>
<!-- Result Content Area -->
<div class="account-recovery-result">
<div class="result-header">
<i class="fas fa-check-circle result-icon"></i>
<h2 class="result-title">회원님의 아이디를 찾았습니다.</h2>
<p class="result-description" th:if="${#lists.size(foundUsers) > 1}">
동일한 정보로 가입된 계정이 <strong th:text="${#lists.size(foundUsers)}">2</strong>개 있습니다.
</p>
</div>
<!-- Found Users List -->
<div class="found-users-list">
<div class="found-user-item" th:each="user, stat : ${foundUsers}">
<div class="user-info">
<span class="user-email" th:text="${user.maskedEmailAddr}">te***@example.com</span>
<span class="user-date">
(<th:block th:text="${#temporals.format(user.createdDate, 'yyyy.MM.dd')}">2024.01.01</th:block> 가입)
</span>
</div>
</div>
</div>
<!-- Info Box -->
<div class="result-info-box">
<p class="info-text">
<i class="fas fa-info-circle"></i>
비밀번호가 기억나지 않는 경우에는
<a th:href="@{/account_recovery(tab='resetPassword')}" class="info-link">비밀번호 초기화</a>
이용해 주세요.
</p>
</div>
</div>
<!-- Action Buttons -->
<div class="form-actions">
<a th:href="@{/account_recovery(tab='findId')}" class="cancel-button">다시 찾기</a>
<a th:href="@{/login}" class="submit-button">로그인</a>
</div>
</div>
</div>
</div>
</th:block>
</body> </body>
<th:block layout:fragment="contentScript"> <th:block layout:fragment="contentScript">
</th:block> </th:block>
@@ -1,22 +1,20 @@
<!doctype html> <!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/kjbank_base_layout}"> xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/kjbank_title_layout}">
<body> <body>
<section layout:fragment="title">
<div class="page-title-banner">
<img th:src="@{/img/img_title_bg.png}" class="title-image">
<h1>비밀번호 초기화</h1>
</div>
</section>
<th:block layout:fragment="contentFragment"> <th:block layout:fragment="contentFragment">
<div class="account-recovery-page"> <div class="account-recovery-page">
<div class="account-recovery-container"> <div class="account-recovery-container">
<div class="account-recovery-card"> <div class="account-recovery-card">
<!-- Logo -->
<div class="account-recovery-logo">
<img th:src="@{/img/logo/logo_box.png}" alt="광주은행">
</div>
<!-- Header Title -->
<h2 class="account-recovery-title">비밀번호 초기화</h2>
<!-- Tab Navigation --> <!-- Tab Navigation -->
<div class="account-recovery-tabs"> <div class="account-recovery-tabs">
<a th:href="@{/account_recovery(tab='findId')}" class="tab-link">아이디 찾기</a> <a th:href="@{/account_recovery(tab='findId')}" class="tab-link">아이디찾기</a>
<a href="#" class="tab-link active">비밀번호 초기화</a> <a href="#" class="tab-link active">비밀번호 초기화</a>
</div> </div>
@@ -30,7 +28,7 @@
<!-- Name Field --> <!-- Name Field -->
<div class="form-group"> <div class="form-group">
<label for="userName" class="form-label">성명</label> <label for="userName" class="form-label">성명<span class="required">*</span></label>
<input type="text" <input type="text"
id="userName" id="userName"
name="userName" name="userName"
@@ -42,7 +40,7 @@
<!-- Email ID Field --> <!-- Email ID Field -->
<div class="form-group"> <div class="form-group">
<label for="loginId" class="form-label">이메일 아이디</label> <label for="loginId" class="form-label">이메일 아이디<span class="required">*</span></label>
<input type="email" <input type="email"
id="loginId" id="loginId"
name="loginId" name="loginId"
@@ -54,7 +52,7 @@
<!-- Phone Number Fields --> <!-- Phone Number Fields -->
<div class="form-group"> <div class="form-group">
<label class="form-label">휴대폰 번호</label> <label class="form-label">휴대폰 번호<span class="required">*</span></label>
<div class="phone-input-group"> <div class="phone-input-group">
<select id="phonePrefix" class="form-select phone-prefix" required> <select id="phonePrefix" class="form-select phone-prefix" required>
<option value="">선택</option> <option value="">선택</option>
@@ -64,37 +62,35 @@
<option value="017">017</option> <option value="017">017</option>
<option value="018">018</option> <option value="018">018</option>
</select> </select>
<span class="phone-separator">-</span> <span class="phone-separator"></span>
<input type="tel" <input type="tel"
id="phoneMiddle" id="phoneMiddle"
name="phoneMiddle" name="phoneMiddle"
maxlength="4" maxlength="4"
class="form-input phone-middle" class="form-input phone-middle"
placeholder="0000" placeholder="1234"
pattern="[0-9]*" pattern="[0-9]*"
inputmode="numeric" inputmode="numeric"
required> required>
<span class="phone-separator">-</span> <span class="phone-separator"></span>
<input type="tel" <input type="tel"
id="phoneLast" id="phoneLast"
name="phoneLast" name="phoneLast"
maxlength="4" maxlength="4"
class="form-input phone-last" class="form-input phone-last"
placeholder="0000" placeholder="1234"
pattern="[0-9]*" pattern="[0-9]*"
inputmode="numeric" inputmode="numeric"
required> required>
<button type="button" class="auth-request-button" id="requestAuthButton">
인증번호 받기
</button>
</div> </div>
</div> </div>
<!-- Auth Number Request Button -->
<button type="button" class="auth-request-button" id="requestAuthButton">
인증번호 받기
</button>
<!-- Auth Number Input --> <!-- Auth Number Input -->
<div class="form-group auth-number-group" id="authNumberGroup" style="display: none;"> <div class="form-group auth-number-group" id="authNumberGroup" style="display: none;">
<label for="authNumber" class="form-label">인증번호 입력</label> <label for="authNumber" class="form-label">인증번호 입력<span class="required">*</span></label>
<div class="auth-input-group"> <div class="auth-input-group">
<input type="text" <input type="text"
id="authNumber" id="authNumber"
@@ -107,20 +103,18 @@
required> required>
<span class="auth-timer" id="authTimer">03:00</span> <span class="auth-timer" id="authTimer">03:00</span>
</div> </div>
</div> <button type="button" class="auth-verify-button" id="verifyAuthButton">
인증번호 확인
<!-- Auth Number Verify Button --> </button>
<button type="button" class="auth-verify-button" id="verifyAuthButton" style="display: none;">
인증번호 확인
</button>
<!-- Submit Buttons -->
<div class="form-actions">
<button type="button" class="cancel-button" id="cancelButton">취소</button>
<button type="submit" class="submit-button" id="submitButton">비밀번호 초기화</button>
</div> </div>
</form> </form>
<!-- Submit Buttons -->
<div class="form-actions">
<button type="button" class="cancel-button" id="cancelButton">취소</button>
<button type="submit" class="submit-button" id="submitButton" form="accountForm">비밀번호 초기화</button>
</div>
<!-- Loading State --> <!-- Loading State -->
<div class="loading-overlay" id="loadingOverlay"> <div class="loading-overlay" id="loadingOverlay">
<div class="spinner"></div> <div class="spinner"></div>
@@ -135,32 +129,20 @@
$(document).ready(function() { $(document).ready(function() {
const errorMsg = [[${error}]]; const errorMsg = [[${error}]];
if (errorMsg) { if (errorMsg) {
showAlert(errorMsg, 'error'); customPopups.showAlert(errorMsg, 'error');
}
const successMsg = [[${success}]];
if (successMsg) {
customPopups.showAlert(successMsg, 'success');
} }
const paramError = new URL(window.location.href).searchParams.get('error'); const paramError = new URL(window.location.href).searchParams.get('error');
if (paramError) { if (paramError) {
showAlert(decodeURIComponent(paramError), 'error'); customPopups.showAlert(decodeURIComponent(paramError), 'error');
} }
}); });
// Alert 표시 함수
function showAlert(message, type = 'info') {
const alertContainer = $('#alertContainer');
const alertClass = type === 'error' ? 'alert-error' : type === 'success' ? 'alert-success' : 'alert-info';
const iconClass = type === 'error' ? 'fa-exclamation-circle' : type === 'success' ? 'fa-check-circle' : 'fa-info-circle';
const alertHtml = `
<div class="account-alert ${alertClass}">
<i class="fas ${iconClass}"></i>
<span>${message}</span>
</div>
`;
alertContainer.html(alertHtml);
setTimeout(() => alertContainer.empty(), 5000);
}
// 휴대폰 번호 결합 함수 // 휴대폰 번호 결합 함수
function combineMobileNumber() { function combineMobileNumber() {
const prefix = $('#phonePrefix').val(); const prefix = $('#phonePrefix').val();
@@ -188,7 +170,7 @@
if (remainingTime <= 0) { if (remainingTime <= 0) {
clearInterval(countdownInterval); clearInterval(countdownInterval);
$('#authTimer').text('시간 초과').css('color', '#FF6B6B'); $('#authTimer').text('시간 초과').css('color', '#FF6B6B');
showAlert('입력 시간이 초과되었습니다. 인증번호를 다시 발송해주세요.', 'error'); customPopups.showAlert('입력 시간이 초과되었습니다. 인증번호를 다시 발송해주세요.', 'error');
// 필드 활성화 // 필드 활성화
$('#phonePrefix, #phoneMiddle, #phoneLast').prop('disabled', false); $('#phonePrefix, #phoneMiddle, #phoneLast').prop('disabled', false);
@@ -210,25 +192,25 @@
$('#requestAuthButton').on('click', function() { $('#requestAuthButton').on('click', function() {
const userName = $('#userName').val().trim(); const userName = $('#userName').val().trim();
if (!userName) { if (!userName) {
showAlert('성명을 입력해주세요.', 'error'); customPopups.showAlert('성명을 입력해주세요.', 'error');
return; return;
} }
const loginId = $('#loginId').val().trim(); const loginId = $('#loginId').val().trim();
if (!loginId) { if (!loginId) {
showAlert('이메일 아이디를 입력해주세요.', 'error'); customPopups.showAlert('이메일 아이디를 입력해주세요.', 'error');
return; return;
} }
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRegex.test(loginId)) { if (!emailRegex.test(loginId)) {
showAlert('올바른 이메일 형식을 입력해주세요.', 'error'); customPopups.showAlert('올바른 이메일 형식을 입력해주세요.', 'error');
return; return;
} }
const mobileNumber = combineMobileNumber(); const mobileNumber = combineMobileNumber();
if (!mobileNumber) { if (!mobileNumber) {
showAlert('휴대폰 번호를 올바르게 입력해주세요.', 'error'); customPopups.showAlert('휴대폰 번호를 올바르게 입력해주세요.', 'error');
return; return;
} }
@@ -246,7 +228,7 @@
$('#loadingOverlay').fadeOut(200); $('#loadingOverlay').fadeOut(200);
if (response.valid) { if (response.valid) {
showAlert(response.message || '인증번호가 발송되었습니다.', 'success'); customPopups.showAlert(response.message || '인증번호가 발송되었습니다.', 'success');
// 휴대폰 번호 필드 비활성화 // 휴대폰 번호 필드 비활성화
$('#phonePrefix, #phoneMiddle, #phoneLast').prop('disabled', true); $('#phonePrefix, #phoneMiddle, #phoneLast').prop('disabled', true);
@@ -259,12 +241,12 @@
isAuthNumberRequested = true; isAuthNumberRequested = true;
startAuthTimer(); startAuthTimer();
} else { } else {
showAlert(response.message || '인증번호 발송에 실패했습니다.', 'error'); customPopups.showAlert(response.message || '인증번호 발송에 실패했습니다.', 'error');
} }
}, },
error: function() { error: function() {
$('#loadingOverlay').fadeOut(200); $('#loadingOverlay').fadeOut(200);
showAlert('처리 중 오류가 발생했습니다. 다시 시도해주세요.', 'error'); customPopups.showAlert('처리 중 오류가 발생했습니다. 다시 시도해주세요.', 'error');
} }
}); });
}); });
@@ -272,14 +254,14 @@
// 인증번호 확인 버튼 // 인증번호 확인 버튼
$('#verifyAuthButton').on('click', function() { $('#verifyAuthButton').on('click', function() {
if (!isAuthNumberRequested) { if (!isAuthNumberRequested) {
showAlert('휴대폰 번호 인증을 먼저 진행해주세요.', 'error'); customPopups.showAlert('휴대폰 번호 인증을 먼저 진행해주세요.', 'error');
return; return;
} }
const authNumber = $('#authNumber').val().trim(); const authNumber = $('#authNumber').val().trim();
if (authNumber.length !== 6) { if (authNumber.length !== 6) {
showAlert('인증번호 6자리를 입력해주세요.', 'error'); customPopups.showAlert('인증번호 6자리를 입력해주세요.', 'error');
return; return;
} }
@@ -298,7 +280,7 @@
$('#loadingOverlay').fadeOut(200); $('#loadingOverlay').fadeOut(200);
if (response.valid) { if (response.valid) {
showAlert(response.message || '인증이 완료되었습니다.', 'success'); customPopups.showAlert(response.message || '인증이 완료되었습니다.', 'success');
// 인증번호 입력 필드 비활성화 // 인증번호 입력 필드 비활성화
$('#authNumber').prop('disabled', true); $('#authNumber').prop('disabled', true);
@@ -309,12 +291,12 @@
isAuthVerified = true; isAuthVerified = true;
} else { } else {
showAlert(response.message || '인증번호가 일치하지 않습니다.', 'error'); customPopups.showAlert(response.message || '인증번호가 일치하지 않습니다.', 'error');
} }
}, },
error: function() { error: function() {
$('#loadingOverlay').fadeOut(200); $('#loadingOverlay').fadeOut(200);
showAlert('처리 중 오류가 발생했습니다. 다시 시도해주세요.', 'error'); customPopups.showAlert('처리 중 오류가 발생했습니다. 다시 시도해주세요.', 'error');
} }
}); });
}); });
@@ -325,35 +307,35 @@
const userName = $('#userName').val().trim(); const userName = $('#userName').val().trim();
if (!userName) { if (!userName) {
showAlert('성명을 입력해주세요.', 'error'); customPopups.showAlert('성명을 입력해주세요.', 'error');
return; return;
} }
const loginId = $('#loginId').val().trim(); const loginId = $('#loginId').val().trim();
if (!loginId) { if (!loginId) {
showAlert('이메일 아이디를 입력해주세요.', 'error'); customPopups.showAlert('이메일 아이디를 입력해주세요.', 'error');
return; return;
} }
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRegex.test(loginId)) { if (!emailRegex.test(loginId)) {
showAlert('올바른 이메일 형식을 입력해주세요.', 'error'); customPopups.showAlert('올바른 이메일 형식을 입력해주세요.', 'error');
return; return;
} }
const mobileNumber = combineMobileNumber(); const mobileNumber = combineMobileNumber();
if (!mobileNumber) { if (!mobileNumber) {
showAlert('휴대폰 번호를 올바르게 입력해주세요.', 'error'); customPopups.showAlert('휴대폰 번호를 올바르게 입력해주세요.', 'error');
return; return;
} }
if (!isAuthNumberRequested) { if (!isAuthNumberRequested) {
showAlert('휴대폰 인증을 먼저 진행해주세요.', 'error'); customPopups.showAlert('휴대폰 인증을 먼저 진행해주세요.', 'error');
return; return;
} }
if (!isAuthVerified) { if (!isAuthVerified) {
showAlert('휴대폰 인증을 완료해주세요.', 'error'); customPopups.showAlert('휴대폰 인증을 완료해주세요.', 'error');
return; return;
} }
@@ -1,39 +0,0 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/kbank_base_layout}">
<body>
<section layout:fragment="contentFragment" class="content">
<div class="content_wrap">
<!-- 타이틀 -->
<div class="sub_title2">
<h2 class="title add5">비밀번호 초기화</h2>
</div>
<div class="inner i_cs10 h_inner2">
<!-- 탭 메뉴 -->
<div class="tab-wrap">
<div class="tabs">
<ul class="tab_nav tabm">
<li><a href="#tab1">아이디 찾기</a></li>
<li class="active"><a href="#tab2">비밀번호 초기화</a></li>
</ul>
<div class="tab active" id="tab2">
<div class="form_type">
<div class="result_view">
<p class="title" th:tex="${successMessage}"></p>
</div>
<div class="btn_application btn_top3">
<a href="/login" class="common_btn_type_1"><span>로그인</span></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</body>
<th:block layout:fragment="contentScript">
</th:block>
</html>
@@ -1,72 +1,69 @@
<!doctype html> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" <html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/kjbank_base_layout}"> layout:decorate="~{layout/kjbank_title_layout}">
<body> <body>
<section layout:fragment="contentFragment" class="content"> <section layout:fragment="title">
<div class="content_wrap"> <div class="page-title-banner">
<!-- 타이틀 --> <img th:src="@{/img/img_title_bg.png}" class="title-image">
<div class="sub_title2" id="title-verification-email"> <h1>이메일 인증</h1>
<h2 class="title add5">이메일 인증</h2> </div>
</section>
<section layout:fragment="contentFragment">
<div class="org-register-container">
<div class="common-title-bar">
<h2 class="common-title">이메일 인증</h2>
</div> </div>
<div class="inner i_cs10 h_inner2"> <div class="register-form-container">
<form id="verificationEmailForm" role="form" name="verificationEmailForm" method="post">
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<input type="hidden" id="userId" name="userId" th:value="${userId}">
<div class="form_type"> <div class="register-form">
<form id="verificationEmailForm" role="form" name="verificationEmailForm" method="post"> <!-- 이메일 주소 + 인증코드 받기 버튼 (한 줄) -->
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/> <div class="form-row" style="margin-bottom: 0">
<input type="hidden" id="userId" name="userId" th:value="${userId}"> <div class="form-label-wrapper label-offset">
<span class="form-label-text">이메일 주소</span>
<!-- 이메일 주소 표시 (readonly) --> </div>
<div class="info1 p_top2"> <div class="form-field-wrapper input-with-button">
<p class="title w_tit"> <input type="email" id="email" name="email" class="form-input input-readonly"
<span class="dot">이메일 주소</span> th:value="${email}" readonly disabled="disabled">
</p> <button type="button" class="btn-input-action btn-auth btn_send_code">인증코드 받기</button>
<div class="info_line">
<div class="info_box1 w_inp4">
<input type="email" id="email" name="email" class="common_input_type_1"
th:value="${email}" readonly style="background-color: #f5f5f5;">
</div>
</div> </div>
<p class="info_txt" style="margin-top: 10px; color: #666;">
위 이메일 주소로 인증코드가 발송됩니다.
</p>
</div> </div>
<!-- 인증코드 받기 버튼 --> <div class="form-row" style="margin-bottom: 0">
<div class="info1 pt28"> <div class="form-label-wrapper label-offset">
<div class="btn_check" style="width: 100%;"> <span class="form-label-text">&nbsp;</span>
<a class="common_btn_type_2 cbt btn_send_code" style="width: 100%;"><span>인증코드 받기</span></a> </div>
<div class="form-field-wrapper">
<p class="form-hint" style="margin-top: 0;">위 이메일 주소로 인증코드가 발송됩니다.</p>
</div> </div>
</div> </div>
<!-- 인증번호 입력 --> <!-- 인증번호 입력 -->
<div class="info1 pt28 auth-code-container" id="authCodeContainer" style="display: none;"> <div class="form-row" id="authCodeContainer" style="display: none;">
<p class="title w_tit"> <div class="form-label-wrapper label-offset">
<span class="dot">인증코드 입력</span> <span class="form-label-text">인증코드 입력</span> <span class="required-badge">필수</span>
</p> </div>
<div class="info_line"> <div class="form-field-wrapper input-with-button">
<div class="info_box1 w_inp5"> <div class="auth-input-group">
<div class="certify_box"> <input type="text" id="authCode" name="authCode" maxlength="6" pattern="[0-9]*"
<input type="text" id="authCode" class="common_input_type_1 w_input" inputmode="numeric" class="form-input"
placeholder="이메일로 받은 인증코드를 입력하세요" maxlength="6" required> placeholder="이메일로 받은 인증코드 6자리">
<span class="certify_time" id="certify_time">05:00</span> <span class="auth-timer" id="certify_time">05:00</span>
</div>
</div>
<div class="btn_check">
<a class="common_btn_type_2 cbt btn_verify_code"><span>인증코드 확인</span></a>
</div> </div>
<button type="button" class="btn-input-action btn-auth btn_verify_code">인증코드 확인</button>
</div> </div>
</div> </div>
</div>
</form>
</div>
<!-- 제출 버튼 --> <!-- Action Buttons -->
<div class="btn_application m_top"> <div class="form-actions">
<a type="button" class="common_btn_type_1 gray btn_cancel"><span>취소</span></a> <button type="button" class="btn-submit btn-secondary">취소</button>
<!-- <div class="btn_gap"></div>-->
<!-- <button type="button" class="common_btn_type_1 btn_complete" disabled><span>인증 완료</span></button>-->
</div>
</form>
</div>
</div> </div>
</div> </div>
</section> </section>
@@ -87,9 +84,12 @@
// 취소 버튼 클릭 시 메인 페이지로 이동 // 취소 버튼 클릭 시 메인 페이지로 이동
$('.btn_cancel').on('click', function() { $('.btn_cancel').on('click', function() {
if (confirm('이메일 인증을 취소하고 메인 페이지로 이동하시겠습니까?')) { customPopups.showConfirm(
location.href = '/'; '이메일 인증을 취소하고 메인 페이지로 이동하시겠습니까?',
} function() {
location.href = '/';
}
);
}); });
// 타이머 시작 함수 (인증 코드 유효 시간) // 타이머 시작 함수 (인증 코드 유효 시간)
@@ -104,12 +104,15 @@
minutes = minutes < 10 ? "0" + minutes : minutes; minutes = minutes < 10 ? "0" + minutes : minutes;
seconds = seconds < 10 ? "0" + seconds : seconds; seconds = seconds < 10 ? "0" + seconds : seconds;
$('#certify_time').text(minutes + ":" + seconds); $('#certify_time').text(minutes + ":" + seconds).css('color', '#666');
if (--timer < 0) { if (--timer < 0) {
clearInterval(timerInterval); clearInterval(timerInterval);
$('#certify_time').text("00:00").css('color', 'red'); $('#certify_time').text("시간 초과").css('color', '#FF6B6B');
customPopups.showAlert("인증 시간이 만료되었습니다. 인증코드를 다시 받아주세요."); customPopups.showAlert("인증 시간이 만료되었습니다. 인증코드를 다시 받아주세요.");
$('.btn_send_code').prop('disabled', false).text('인증코드 재발송');
$('.btn_verify_code').prop('disabled', true);
$('#authCode').prop('readonly', true);
} }
}, 1000); }, 1000);
} }
@@ -124,11 +127,11 @@
resendTimerInterval = setInterval(function () { resendTimerInterval = setInterval(function () {
if (resendTimer > 0) { if (resendTimer > 0) {
$button.find('span').text('재발송 가능 (' + resendTimer + '초)'); $button.text('재발송 가능 (' + resendTimer + '초)');
resendTimer--; resendTimer--;
} else { } else {
clearInterval(resendTimerInterval); clearInterval(resendTimerInterval);
$button.prop('disabled', false).find('span').text('인증코드 재발송'); $button.prop('disabled', false).text('인증코드 재발송');
} }
}, 1000); }, 1000);
} }
@@ -140,7 +143,7 @@
const email = $('#email').val(); const email = $('#email').val();
const $button = $(this); const $button = $(this);
$button.prop('disabled', true).find('span').text('발송 중...'); $button.prop('disabled', true).text('발송 중...');
$.ajax({ $.ajax({
url: '/mypage/send-verification-code', url: '/mypage/send-verification-code',
@@ -152,14 +155,16 @@
}, },
success: function(response) { success: function(response) {
customPopups.showAlert('인증코드가 이메일로 발송되었습니다.'); customPopups.showAlert('인증코드가 이메일로 발송되었습니다.');
$('#authCodeContainer').show(); $('#authCodeContainer').slideDown(300);
$('#authCode').prop('readonly', false);
$('.btn_verify_code').prop('disabled', false);
startTimer(300); // 5분 타이머 startTimer(300); // 5분 타이머
startResendTimer(); // 재발송 타이머 시작 (1분) startResendTimer(); // 재발송 타이머 시작 (1분)
}, },
error: function(xhr) { error: function(xhr) {
const errorMsg = xhr.responseJSON?.error || '인증코드 발송에 실패했습니다.'; const errorMsg = xhr.responseJSON?.error || '인증코드 발송에 실패했습니다.';
customPopups.showAlert(errorMsg); customPopups.showAlert(errorMsg);
$button.prop('disabled', false).find('span').text('인증코드 받기'); $button.prop('disabled', false).text('인증코드 받기');
} }
}); });
}); });
@@ -194,14 +199,21 @@
}, },
success: function(response) { success: function(response) {
clearInterval(timerInterval); clearInterval(timerInterval);
clearInterval(resendTimerInterval);
isVerified = true; isVerified = true;
// 인증 완료 UI 업데이트
$('#authCode').prop('disabled', true);
$('.btn_verify_code').prop('disabled', true);
$('.btn_send_code').prop('disabled', true);
$('#certify_time').text('인증 완료').css('color', '#6BCF7F');
customPopups.showAlert('이메일 인증이 완료되었습니다!'); customPopups.showAlert('이메일 인증이 완료되었습니다!');
// 알림 확인 후 메인 페이지로 이동 // 알림 확인 후 메인 페이지로 이동
$('#customAlertOkButton').off('click.emailVerify').on('click.emailVerify', function () { setTimeout(function() {
customPopups.hideAlert('#customAlert');
location.href = '/'; location.href = '/';
}); }, 2000);
}, },
error: function(xhr) { error: function(xhr) {
const errorMsg = xhr.responseJSON?.error || '인증코드가 일치하지 않습니다.'; const errorMsg = xhr.responseJSON?.error || '인증코드가 일치하지 않습니다.';
@@ -210,20 +222,9 @@
}); });
}); });
// 인증 완료 버튼 클릭 // 인증코드 입력 필드 숫자만 허용
$('.btn_complete').on('click', function(e) { $('#authCode').on('input', function() {
e.preventDefault(); $(this).val($(this).val().replace(/[^0-9]/g, ''));
if (!isVerified) {
customPopups.showAlert('이메일 인증을 먼저 완료해주세요.');
return;
}
// 메인 페이지로 이동
customPopups.showAlert('이메일 인증이 완료되었습니다. 메인 페이지로 이동합니다.');
setTimeout(function() {
location.href = '/';
}, 1500);
}); });
}); });
@@ -60,12 +60,12 @@
<!-- CEO Name --> <!-- CEO Name -->
<div class="org-form-group"> <div class="org-form-group">
<label class="org-form-label" for="ceoName"> <label class="org-form-label" for="ceoName">
대표자 성명 <span class="required-badge">필수</span> 대표자 성명
</label> </label>
<div class="org-form-input-wrapper"> <div class="org-form-input-wrapper">
<input type="text" class="org-form-input" id="ceoName" th:field="*{ceoName}" <input type="text" class="org-form-input" id="ceoName" th:field="*{ceoName}"
placeholder="대표자 성명을 입력하세요" placeholder="대표자 성명을 입력하세요"
th:classappend="${#fields.hasErrors('ceoName')}? 'is-invalid'" required> th:classappend="${#fields.hasErrors('ceoName')}? 'is-invalid'">
<div th:if="${#fields.hasErrors('ceoName')}" class="org-validation-message error"> <div th:if="${#fields.hasErrors('ceoName')}" class="org-validation-message error">
<span th:errors="*{ceoName}"></span> <span th:errors="*{ceoName}"></span>
</div> </div>
@@ -75,12 +75,12 @@
<!-- Business Address --> <!-- Business Address -->
<div class="org-form-group"> <div class="org-form-group">
<label class="org-form-label" for="orgAddr"> <label class="org-form-label" for="orgAddr">
사업장 소재지 <span class="required-badge">필수</span> 사업장 소재지
</label> </label>
<div class="org-form-input-wrapper"> <div class="org-form-input-wrapper">
<input type="text" class="org-form-input" id="orgAddr" th:field="*{orgAddr}" <input type="text" class="org-form-input" id="orgAddr" th:field="*{orgAddr}"
placeholder="사업장 소재지를 입력하세요" placeholder="사업장 소재지를 입력하세요"
th:classappend="${#fields.hasErrors('orgAddr')}? 'is-invalid'" required> th:classappend="${#fields.hasErrors('orgAddr')}? 'is-invalid'">
<div th:if="${#fields.hasErrors('orgAddr')}" class="org-validation-message error"> <div th:if="${#fields.hasErrors('orgAddr')}" class="org-validation-message error">
<span th:errors="*{orgAddr}"></span> <span th:errors="*{orgAddr}"></span>
</div> </div>
@@ -90,33 +90,33 @@
<!-- Business Type --> <!-- Business Type -->
<div class="org-form-group"> <div class="org-form-group">
<label class="org-form-label" for="orgSectors"> <label class="org-form-label" for="orgSectors">
업태 <span class="required-badge">필수</span> 업태
</label> </label>
<div class="org-form-input-wrapper"> <div class="org-form-input-wrapper">
<input type="text" class="org-form-input" id="orgSectors" th:field="*{orgSectors}" <input type="text" class="org-form-input" id="orgSectors" th:field="*{orgSectors}"
placeholder="업태를 입력하세요" required> placeholder="업태를 입력하세요">
</div> </div>
</div> </div>
<!-- Industry Type --> <!-- Industry Type -->
<div class="org-form-group"> <div class="org-form-group">
<label class="org-form-label" for="orgIndustryType"> <label class="org-form-label" for="orgIndustryType">
업종 <span class="required-badge">필수</span> 업종
</label> </label>
<div class="org-form-input-wrapper"> <div class="org-form-input-wrapper">
<input type="text" class="org-form-input" id="orgIndustryType" th:field="*{orgIndustryType}" <input type="text" class="org-form-input" id="orgIndustryType" th:field="*{orgIndustryType}"
placeholder="업종을 입력하세요" required> placeholder="업종을 입력하세요">
</div> </div>
</div> </div>
<!-- Company Phone Number --> <!-- Company Phone Number -->
<div class="org-form-group"> <div class="org-form-group">
<label class="org-form-label"> <label class="org-form-label">
회사 전화번호 <span class="required-badge">필수</span> 회사 전화번호
</label> </label>
<div class="org-form-input-wrapper"> <div class="org-form-input-wrapper">
<div class="org-compound-input"> <div class="org-compound-input">
<select class="org-form-select" id="orgAreaCode" required> <select class="org-form-select" id="orgAreaCode">
<option value="">선택</option> <option value="">선택</option>
<option value="국번없음">국번없음</option> <option value="국번없음">국번없음</option>
<option value="02">02</option> <option value="02">02</option>
@@ -159,12 +159,12 @@
<!-- Service Name --> <!-- Service Name -->
<div class="org-form-group"> <div class="org-form-group">
<label class="org-form-label" for="serviceName"> <label class="org-form-label" for="serviceName">
서비스명 <span class="required-badge">필수</span> 서비스명
</label> </label>
<div class="org-form-input-wrapper"> <div class="org-form-input-wrapper">
<input type="text" class="org-form-input" id="serviceName" th:field="*{serviceName}" <input type="text" class="org-form-input" id="serviceName" th:field="*{serviceName}"
placeholder="서비스명을 입력하세요" placeholder="서비스명을 입력하세요"
th:classappend="${#fields.hasErrors('serviceName')}? 'is-invalid'" required> th:classappend="${#fields.hasErrors('serviceName')}? 'is-invalid'">
<div th:if="${#fields.hasErrors('serviceName')}" class="org-validation-message error"> <div th:if="${#fields.hasErrors('serviceName')}" class="org-validation-message error">
<span th:errors="*{serviceName}"></span> <span th:errors="*{serviceName}"></span>
</div> </div>
@@ -174,11 +174,11 @@
<!-- Customer Service Phone Number --> <!-- Customer Service Phone Number -->
<div class="org-form-group"> <div class="org-form-group">
<label class="org-form-label"> <label class="org-form-label">
고객센터 전화번호 <span class="required-badge">필수</span> 고객센터 전화번호
</label> </label>
<div class="org-form-input-wrapper"> <div class="org-form-input-wrapper">
<div class="org-compound-input"> <div class="org-compound-input">
<select class="org-form-select" id="scAreaCode" required> <select class="org-form-select" id="scAreaCode">
<option value="">선택</option> <option value="">선택</option>
<option value="국번없음">국번없음</option> <option value="국번없음">국번없음</option>
<option value="02">02</option> <option value="02">02</option>
@@ -265,8 +265,9 @@
const part1 = document.getElementById(`${prefix}PhoneNumber1`).value.trim(); const part1 = document.getElementById(`${prefix}PhoneNumber1`).value.trim();
const part2 = document.getElementById(`${prefix}PhoneNumber2`).value.trim(); const part2 = document.getElementById(`${prefix}PhoneNumber2`).value.trim();
// 회사 전화번호 검증 // 전화번호는 선택 입력이므로, 일부만 입력된 경우에만 검증
if (!areaCode || areaCode === '' || !part1 || !part2) { const hasAnyInput = areaCode || part1 || part2;
if (hasAnyInput && (!areaCode || areaCode === '' || !part1 || !part2)) {
customPopups.showAlert(`${prefix === 'org' ? '회사' : '고객센터'} 전화번호를 모두 입력해주세요.`); customPopups.showAlert(`${prefix === 'org' ? '회사' : '고객센터'} 전화번호를 모두 입력해주세요.`);
return false; return false;
} }
@@ -1,131 +1,120 @@
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <html lang="ko" xmlns:th="http://www.thymeleaf.org"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/kjbank_base_layout}"> layout:decorate="~{layout/kjbank_title_layout}">
<body> <body>
<section layout:fragment="contentFragment" class="content"> <section layout:fragment="title">
<div class="content_wrap"> <div class="page-title-banner">
<div class="sub_title2"> <img th:src="@{/img/img_title_bg.png}" alt="초대 코드 입력" class="title-image">
<h2 class="title add2">초대 코드 입력</h2> <h1>초대 코드 입력</h1>
</div>
</section>
<section layout:fragment="contentFragment">
<div class="org-register-page">
<div class="org-register-container">
<!-- Alert Container -->
<div id="alertContainer"></div>
<!-- Info Notice -->
<div class="org-section-header" style="margin-top: 60px; margin-bottom: 60px;">
<h3>법인 기관으로부터 받으신 8자리 초대 코드를 입력해 주세요.</h3>
</div>
<form id="invitationCodeForm" method="post" th:action="@{/signup/invitation-code}">
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<!-- Invitation Code Section -->
<div class="org-section-header org-section-header--agreement">
<h3>초대 코드</h3>
<span class="required-badge">필수 입력</span>
</div> </div>
<div class="inner i_cs9 h_inner9">
<div class="form_type">
<div class="con_title">
<p>법인 기관으로부터 받으신 8자리 초대 코드를 입력해 주세요.</p>
</div>
<form id="invitationCodeForm" method="post" th:action="@{/signup/invitation-code}"> <!-- Invitation Code Input -->
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/> <div class="org-form-group">
<label class="org-form-label" for="invitationCode">
<div class="form_type_box"> 초대 코드 <span class="required-badge">필수</span>
<div class="info1 form_top"> </label>
<p class="title"> <div class="org-form-input-wrapper">
<span>초대 코드</span> <input type="text"
</p> id="invitationCode"
<div class="info_line info_add"> name="invitationCode"
<div class="info_box1 add add2"> class="org-form-input"
<!-- <input type="text"--> placeholder="8자리 초대 코드를 입력해 주세요"
<!-- id="invitationCode"--> maxlength="8"
<!-- name="invitationCode"--> required
<!-- class="common_input_type_1 h_inp"--> th:disabled="${lockoutTime != null}"
<!-- placeholder="8자리 초대 코드를 입력해 주세요"--> style="text-transform: uppercase;">
<!-- maxlength="8"--> </div>
<!-- pattern="[A-Z0-9]{8}"-->
<!-- title="8자리 영문 대문자와 숫자로 입력해주세요"-->
<!-- required-->
<!-- style="text-transform: uppercase;">-->
<input type="text"
id="invitationCode"
name="invitationCode"
class="common_input_type_1 h_inp"
placeholder="8자리 초대 코드를 입력해 주세요"
maxlength="8"
required
style="text-transform: uppercase;">
</div>
</div>
</div>
<div class="info_txt" style="margin-top: 25px;">
<p>※ 초대 코드는 이메일로 전달받으실 수 있습니다.</p>
<p>※ 초대 코드는 대소문자를 구분하지 않으며, 8자리 영문자와 숫자로 구성되어 있습니다.</p>
</div>
</div>
<!-- 에러 메시지 표시 영역 -->
<div th:if="${error}" class="error_message" style="color: #d32f2f; margin: 25px 0 15px 0; padding: 10px; background-color: #ffebee; border-radius: 4px;">
<p th:text="${error}"></p>
</div>
<!-- 브루트포스 방지: 시도 횟수 표시 -->
<div th:if="${attemptsRemaining != null and attemptsRemaining <= 3}"
class="warning_message"
style="color: #f57c00; margin: 25px 0 15px 0; padding: 10px; background-color: #fff3e0; border-radius: 4px;">
<p>남은 시도 횟수: <strong th:text="${attemptsRemaining}"></strong></p>
<p>5회 실패 시 15분간 입력이 제한됩니다.</p>
</div>
<!-- 브루트포스 방지: 계정 잠금 메시지 -->
<div th:if="${lockoutTime != null}"
class="error_message"
style="color: #d32f2f; margin: 25px 0 15px 0; padding: 10px; background-color: #ffebee; border-radius: 4px;">
<p>잘못된 초대 코드를 5회 입력하셨습니다.</p>
<p th:text="${lockoutTime} + ' 후에 다시 시도해 주세요.'"></p>
</div>
<div class="btn_login">
<button type="submit" class="common_btn_type_1 h_btn" th:disabled="${lockoutTime != null}" style="width: 100%; border: none; cursor: pointer;">
<span>확인</span>
</button>
</div>
</form>
<div class="login_list pc-only" style="margin-top: 20px;">
<ul>
<li>
<a th:href="@{/login}">로그인 페이지로 돌아가기</a>
</li>
<li>
<span>|</span>
</li>
<li>
<a th:href="@{/signup}">회원가입</a>
</li>
</ul>
</div>
<div class="login_list m-only" style="margin-top: 20px;">
<ul>
<li>
<a th:href="@{/login}">로그인 페이지로 돌아가기</a>
</li>
<li>
<span>|</span>
</li>
<li>
<a th:href="@{/signup}">회원가입</a>
</li>
</ul>
</div>
</div>
</div> </div>
<!-- Info Notice -->
<div class="org-info-notice">
<ul>
<li>초대 코드는 이메일로 전달받으실 수 있습니다.</li>
<li>초대 코드는 대소문자를 구분하지 않으며, 8자리 영문자와 숫자로 구성되어 있습니다.</li>
</ul>
</div>
<!-- Warning: Remaining Attempts -->
<div th:if="${attemptsRemaining != null and attemptsRemaining <= 3}" class="org-info-notice" style="background-color: #fff3e0; border-color: #f57c00;">
<ul style="color: #f57c00;">
<li>남은 시도 횟수: <strong th:text="${attemptsRemaining}"></strong></li>
<li>5회 실패 시 15분간 입력이 제한됩니다.</li>
</ul>
</div>
<!-- Error: Account Lockout -->
<div th:if="${lockoutTime != null}" class="org-info-notice" style="background-color: #ffebee; border-color: #d32f2f;">
<ul style="color: #d32f2f;">
<li>잘못된 초대 코드를 5회 입력하셨습니다.</li>
<li th:text="${lockoutTime} + ' 후에 다시 시도해 주세요.'"></li>
</ul>
</div>
<!-- Action Buttons -->
<div class="org-action-buttons">
<a th:href="@{/login}" class="btn btn-secondary">취소</a>
<button type="submit" class="btn btn-primary" th:disabled="${lockoutTime != null}">확인</button>
</div>
</form>
<!-- Additional Links -->
<div class="org-info-notice" style="text-align: center; margin-top: 40px;">
<a th:href="@{/login}" style="color: #666; margin-right: 20px;">로그인</a>
<span style="color: #ddd;">|</span>
<a th:href="@{/signup}" style="color: #666; margin-left: 20px;">회원가입</a>
</div>
<!-- Loading Overlay -->
<div class="org-loading-overlay" id="loadingOverlay">
<div class="spinner"></div>
</div>
</div> </div>
</div>
</section> </section>
<th:block layout:fragment="contentScript"> <th:block layout:fragment="contentScript">
<script> <script th:inline="javascript">
$(document).ready(function() { $(document).ready(function() {
// 초대 코드 입력 필드를 대문자로 자동 변환 // 에러 메시지 표시
$('#invitationCode').on('input', function() { const errorMsg = [[${error}]];
this.value = this.value.toUpperCase(); if (errorMsg) {
}); customPopups.showAlert(errorMsg, 'error');
}
// 성공 메시지가 있으면 표시 // 성공 메시지 표시
var successMsg = [[${success}]]; const successMsg = [[${success}]];
if (successMsg) { if (successMsg) {
customPopups.showAlert(successMsg); customPopups.showAlert(successMsg, 'success');
} }
});
</script> // 초대 코드 입력 필드를 대문자로 자동 변환
$('#invitationCode').on('input', function() {
this.value = this.value.toUpperCase();
});
});
</script>
</th:block> </th:block>
</body> </body>
</html> </html>
@@ -5,7 +5,7 @@
<body> <body>
<section layout:fragment="title"> <section layout:fragment="title">
<div class="page-title-banner"> <div class="page-title-banner">
<img th:src="@{/img/user_register_title.png}" alt="법인회원가입" class="title-image"> <img th:src="@{/img/img_title_bg.png}" alt="법인회원가입" class="title-image">
<h1>법인회원가입</h1> <h1>법인회원가입</h1>
</div> </div>
</section> </section>
@@ -117,15 +117,15 @@
const requiredFieldsByScenario = { const requiredFieldsByScenario = {
new: { new: {
user: ['loginId', 'userName', 'password', 'password2', 'mobileNumber', 'authNumber'], user: ['loginId', 'userName', 'password', 'password2', 'mobileNumber', 'authNumber'],
org: ['compRegNo', 'corpRegNo', 'orgName', 'ceoName', 'orgAddr', 'orgSectors', 'orgIndustryType', 'orgPhoneNumber', 'scPhoneNumber', 'serviceName', 'compRegFile', 'files'] org: ['compRegNo', 'corpRegNo', 'orgName', 'compRegFile', 'files']
}, },
retain: { retain: {
user: ['loginId', 'passwordConfirmIndividual'], user: ['loginId', 'passwordConfirmIndividual'],
org: ['compRegNo', 'corpRegNo', 'orgName', 'ceoName', 'orgAddr', 'orgSectors', 'orgIndustryType', 'orgPhoneNumber', 'scPhoneNumber', 'serviceName', 'compRegFile', 'files'] org: ['compRegNo', 'corpRegNo', 'orgName', 'compRegFile', 'files']
}, },
change: { change: {
user: ['loginId', 'passwordConfirmEmailChange', 'newLoginId'], user: ['loginId', 'passwordConfirmEmailChange', 'newLoginId'],
org: ['compRegNo', 'corpRegNo', 'orgName', 'ceoName', 'orgAddr', 'orgSectors', 'orgIndustryType', 'orgPhoneNumber', 'scPhoneNumber', 'serviceName', 'compRegFile', 'files'] org: ['compRegNo', 'corpRegNo', 'orgName', 'compRegFile', 'files']
} }
}; };
@@ -344,11 +344,6 @@
compRegNo: $('#compRegNo').val().trim() !== '', compRegNo: $('#compRegNo').val().trim() !== '',
corpRegNo: $('#corpRegNo').val().trim() !== '', corpRegNo: $('#corpRegNo').val().trim() !== '',
orgName: $('#orgName').val().trim() !== '', orgName: $('#orgName').val().trim() !== '',
ceoName: $('#ceoName').val().trim() !== '',
orgAddr: $('#orgAddr').val().trim() !== '',
orgPhoneNumber: $('#orgPhoneNumber').val().trim() !== '',
scPhoneNumber: $('#scPhoneNumber').val().trim() !== '',
serviceName: $('#serviceName').val().trim() !== '',
compRegFile: $('#compRegFile').val().trim() !== '' compRegFile: $('#compRegFile').val().trim() !== ''
}; };
@@ -1,63 +1,70 @@
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" <html lang="ko" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/kbank_mypage_layout}"> layout:decorate="~{layout/kjbank_title_layout}">
<body> <body>
<section layout:fragment="contentFragment" class="content"> <section layout:fragment="title">
<div class="content_wrap"> <div class="page-title-banner">
<div class="sub_title2"> <img th:src="@{/img/img_title_bg.png}" alt="법인회원 초대" class="title-image">
<h2 class="title">법인회원 초대</h2> <h1>법인회원 초대</h1>
</div> </div>
<div class="inner i_cs11 h_inner8"> </section>
<form id="invitationForm" th:action="@{/signup/decision_process}" method="get" class="form_type">
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<input type="hidden" name="invitationToken" th:value="${param.invitation}"/>
<input type="hidden" id="actionInput" name="action" value=""/>
<div class="con_title m_btm0"> <th:block layout:fragment="contentFragment">
<p class="tit_txt"> <div class="account-recovery-page">
<span th:text="${userName}"></span>님 안녕하세요.<br><br> <div class="account-recovery-container">
<span th:text="${orgName}"></span>에서 귀하를 Kbank API Portal 법인회원으로 초대하였습니다.<br> <div class="account-recovery-card">
<br> 광주은행과 함께 금융서비스를 손쉽게 개발해 보세요.<br><br> <!-- Result Content Area -->
로그인 하여 법인회원 전환을 진행하세요.<br> <div class="account-recovery-result">
</p> <div class="result-header">
<i class="fas fa-envelope-open-text result-icon" style="color: #1a73e8;"></i>
<h2 class="result-title">법인회원 초대가 도착했습니다.</h2>
</div>
<!-- Info Box -->
<div class="result-info-box">
<p class="info-text">
<strong th:text="${userName}"></strong>님, 안녕하세요.
</p>
<p class="info-text" style="margin-top: 16px;">
<strong th:text="${orgName}"></strong>에서
광주은행 API Portal 법인회원으로 초대하였습니다.
</p>
</div>
<div class="result-info-box" style="background-color: #fff3cd; border-color: #ffc107; margin-top: 16px;">
<p class="info-text" style="margin: 0;">
<strong>초대코드:</strong>
<span th:text="${invitationCode}" style="font-family: monospace; font-size: 18px; font-weight: bold; color: #333; letter-spacing: 3px; margin-left: 8px;"></span>
</p>
<p style="margin: 8px 0 0 0; font-size: 12px; color: #856404;">
이메일로 받은 초대코드와 일치하는지 확인해 주세요.
</p>
</div>
<div class="result-info-box" style="background-color: #e7f3ff; border-color: #1a73e8; margin-top: 16px;">
<p class="info-text" style="margin: 0; color: #1a73e8;">
<i class="fas fa-info-circle"></i>
초대를 수락하려면 <strong>로그인</strong>이 필요합니다.
</p>
</div>
</div> </div>
<div class="info_box" style="margin-top: 20px; padding: 15px; background-color: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px;">
<p style="margin: 0; font-size: 14px; color: #666;"> <!-- Action Buttons -->
<strong>초대코드:</strong> <div class="form-actions">
<span th:text="${invitationCode}" style="font-family: monospace; font-size: 16px; font-weight: bold; color: #333; letter-spacing: 2px;"></span> <a th:href="@{/login}" class="submit-button">로그인하기</a>
</p>
<p style="margin: 8px 0 0 0; font-size: 12px; color: #999;">
이메일로 받은 초대코드와 일치하는지 확인해 주세요.
</p>
</div> </div>
<div class="btn_application m_top"> </div>
<button type="button" onclick="submitForm('reject')" class="common_btn_type_1 gray">
<span>취소</span>
</button>
<div class="btn_gap"></div>
<button type="button" onclick="submitForm('accept')" class="common_btn_type_1">
<span>수락</span>
</button>
</div>
</form>
</div> </div>
</div> </div>
</th:block>
<th:block layout:fragment="contentScript">
<script th:if="${error}" th:inline="javascript"> <script th:if="${error}" th:inline="javascript">
$(document).ready(function () { $(document).ready(function () {
customPopups.showAlert([[${error}]]); customPopups.showAlert([[${error}]]);
}) });
</script> </script>
<script> </th:block>
function submitForm(action) {
if (action === 'accept') {
document.getElementById('actionInput').value = action;
document.getElementById('invitationForm').submit();
} else {
window.location.href = '/signup/deny';
}
}
</script>
</section>
</body> </body>
</html> </html>
@@ -1,93 +1,139 @@
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" <html lang="ko" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/kbank_mypage_layout}"> layout:decorate="~{layout/kjbank_title_layout}">
<body> <body>
<section layout:fragment="contentFragment" class="content"> <section layout:fragment="title">
<div class="content_wrap"> <div class="page-title-banner">
<div class="sub_title2"> <img th:src="@{/img/img_title_bg.png}" alt="법인회원 초대" class="title-image">
<h2 class="title">법인회원 초대</h2> <h1>법인회원 초대</h1>
</div> </div>
<div class="inner i_cs h_inner2"> </section>
<th:block
th:replace="~{apps/register/userAgreementContent :: agreementContent(${termsOfUse}, ${privacyCollect})}"></th:block> <th:block layout:fragment="contentFragment">
<form id="invitationForm" th:action="@{/signup/decision}" method="post" class="form_type"> <div class="org-register-page">
<div class="org-register-container">
<!-- Hidden Fields -->
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<!-- Alert Container -->
<div id="alertContainer"></div>
<!-- Invitation Info Section -->
<div class="org-section-header org-section-header--agreement">
<h3>초대 정보</h3>
</div>
<div class="account-recovery-card" style="margin-bottom: 32px;">
<div class="account-recovery-result">
<div class="result-header">
<i class="fas fa-envelope-open-text result-icon" style="color: #1a73e8;"></i>
<h2 class="result-title" style="font-size: 18px;">
<strong th:text="${userName}"></strong>님, 법인회원 초대가 도착했습니다.
</h2>
</div>
<div class="result-info-box">
<p class="info-text">
<strong th:text="${orgName}"></strong>에서
광주은행 API Portal 법인회원으로 초대하였습니다.
</p>
<p class="info-text" style="margin-top: 8px;">
초대를 수락하시면 법인회원으로 전환됩니다.
</p>
</div>
<div class="result-info-box" style="background-color: #fff3cd; border-color: #ffc107; margin-top: 16px;">
<p class="info-text" style="margin: 0;">
<strong>초대코드:</strong>
<span th:text="${invitationCode}" style="font-family: monospace; font-size: 18px; font-weight: bold; color: #333; letter-spacing: 3px; margin-left: 8px;"></span>
</p>
<p style="margin: 8px 0 0 0; font-size: 12px; color: #856404;">
이메일로 받은 초대코드와 일치하는지 확인해 주세요.
</p>
</div>
</div>
</div>
<!-- Agreement Section -->
<th:block th:replace="~{apps/register/userAgreementContent :: agreementContent(${termsOfUse}, ${privacyCollect})}"></th:block>
<form id="invitationForm" th:action="@{/signup/decision}" method="post">
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/> <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<input type="hidden" name="invitationToken" th:value="${param.invitation}"/> <input type="hidden" name="invitationToken" th:value="${invitationCode}"/>
<input type="hidden" id="actionInput" name="action" value=""/> <input type="hidden" id="actionInput" name="action" value=""/>
<div class="terms_box"> <!-- Action Buttons -->
<p>초대 수락</p> <div class="org-action-buttons">
</div> <button type="button" class="btn btn-secondary" id="rejectButton">거절</button>
<div class="con_title m_btm0"> <button type="button" class="btn btn-primary" id="acceptButton">수락</button>
<p class="tit_txt">
<span th:text="${userName}"></span>님 안녕하세요.<br><br>
<span th:text="${orgName}"></span>에서 귀하를 Kbank API Portal 법인회원으로 초대하였습니다.<br>
<br> Kbank와 함께 금융서비스를 손쉽게 개발해 보세요.<br><br>
초대를 수락하시면 법인회원으로 전환됩니다.<br>
</p>
</div>
<div class="info_box" style="margin-top: 20px; padding: 15px; background-color: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px;">
<p style="margin: 0; font-size: 14px; color: #666;">
<strong>초대코드:</strong>
<span th:text="${invitationCode}" style="font-family: monospace; font-size: 16px; font-weight: bold; color: #333; letter-spacing: 2px;"></span>
</p>
<p style="margin: 8px 0 0 0; font-size: 12px; color: #999;">
이메일로 받은 초대코드와 일치하는지 확인해 주세요.
</p>
</div>
<div class="btn_application m_top">
<button type="button" onclick="submitForm('reject')" class="common_btn_type_1 gray">
<span>거절</span>
</button>
<div class="btn_gap"></div>
<button type="button" onclick="submitForm('accept')" class="common_btn_type_1">
<span>수락</span>
</button>
</div> </div>
</form> </form>
<!-- Loading Overlay -->
<div class="org-loading-overlay" id="loadingOverlay">
<div class="spinner"></div>
</div>
</div> </div>
</div> </div>
</th:block>
<th:block layout:fragment="contentScript">
<script th:replace="~{apps/register/userAgreementContent :: agreementScript}"></script> <script th:replace="~{apps/register/userAgreementContent :: agreementScript}"></script>
<script th:if="${error}" th:inline="javascript"> <script th:if="${error}" th:inline="javascript">
$(document).ready(function () { $(document).ready(function () {
customPopups.showAlert([[${error}]]); customPopups.showAlert([[${error}]]);
}) });
</script> </script>
<script> <script>
function submitForm(action) { document.addEventListener('DOMContentLoaded', function () {
let form = document.getElementById('invitationForm'); let form = document.getElementById('invitationForm');
form.action.value = action;
let agreementForm = document.getElementById('agreementForm'); let agreementForm = document.getElementById('agreementForm');
agreementForm.classList.add('was-validated'); let acceptButton = document.getElementById('acceptButton');
let rejectButton = document.getElementById('rejectButton');
let agreementFormData = new FormData(agreementForm); function submitForm(action) {
if (action === 'accept') { if (action === 'accept') {
if (agreementForm.checkValidity()) { agreementForm.classList.add('was-validated');
// 약관 동의 폼의 데이터를 hidden input으로 추가
let agreementFormData = new FormData(agreementForm); if (agreementForm.checkValidity()) {
for (let pair of agreementFormData.entries()) { // 약관 동의 폼의 데이터를 hidden input으로 추가
if (!form.querySelector('input[name="' + pair[0] + '"]')) { let agreementFormData = new FormData(agreementForm);
let input = document.createElement('input'); for (let pair of agreementFormData.entries()) {
input.type = 'hidden'; if (!form.querySelector('input[name="' + pair[0] + '"]')) {
input.name = pair[0]; let input = document.createElement('input');
input.value = pair[1]; input.type = 'hidden';
form.appendChild(input); input.name = pair[0];
input.value = pair[1];
form.appendChild(input);
}
} }
document.getElementById('actionInput').value = action;
document.getElementById('loadingOverlay').classList.add('active');
form.submit();
} else {
customPopups.showAlert('모든 약관에 동의해 주세요.');
} }
form.submit();
} else { } else {
customPopups.showAlert('모든 약관에 동의해 주세요.'); document.getElementById('actionInput').value = action;
document.getElementById('loadingOverlay').classList.add('active');
form.submit();
} }
} else {
form.submit();
} }
document.getElementById('actionInput').value = action; acceptButton.addEventListener('click', function () {
document.getElementById('invitationForm').submit(); submitForm('accept');
} });
rejectButton.addEventListener('click', function () {
customPopups.showConfirm('초대를 거절하시겠습니까?', function (confirmed) {
if (confirmed) {
submitForm('reject');
}
});
});
});
</script> </script>
</section> </th:block>
</body> </body>
</html> </html>
@@ -5,7 +5,7 @@
<body> <body>
<section layout:fragment="title"> <section layout:fragment="title">
<div class="page-title-banner"> <div class="page-title-banner">
<img th:src="@{/img/user_register_title.png}" alt="개인회원가입" class="title-image"> <img th:src="@{/img/img_title_bg.png}" alt="개인회원가입" class="title-image">
<h1 th:text="${!isInvited ? '개인회원가입' : '법인회원가입'}">개인회원가입</h1> <h1 th:text="${!isInvited ? '개인회원가입' : '법인회원가입'}">개인회원가입</h1>
</div> </div>
</section> </section>
@@ -1,40 +1,42 @@
<!DOCTYPE html> <!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/kjbank_title_layout}">
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/kjbank_base_layout}">
<body> <body>
<section layout:fragment="contentFragment" class="content"> <section layout:fragment="title">
<div class="content_wrap"> <div class="page-title-banner">
<div class="sub_title2"> <img th:src="@{/img/img_title_bg.png}" class="title-image">
<h2 class="title add2">회원가입 완료</h2> <h1>회원가입</h1>
</div> </div>
<div class="inner i_cs2">
<div class="con_title">
<p>회원 가입신청이 되었습니다.</p>
</div>
<div class="form_type top_m">
<div class="i_complete">
<img th:src="@{/img/icon/icon_complete.png}" alt="완료 아이콘">
</div>
<div class="complete_txt">
<p>
API Portal 서비스를 이용하기 위해서<br>
이메일 인증을 완료 해주세요.
</p>
</div>
<div class="btn_home btn_home2">
<a th:href="@{/}" class="common_btn_type_1"><span>홈으로</span></a>
</div>
</div>
</div>
</div>
</section> </section>
<th:block layout:fragment="script"> <th:block layout:fragment="contentFragment">
<script th:src="@{/js/jquery-3.7.1.min.js}"></script> <div class="account-recovery-page">
<script th:src="@{/js/daterangepicker.js}"></script> <div class="account-recovery-container">
<script th:src="@{/js/slick.min.js}"></script> <div class="account-recovery-card">
<script th:src="@{/js/front2.js}"></script> <!-- Result Content Area -->
<div class="account-recovery-result">
<div class="result-header">
<i class="fas fa-check-circle result-icon"></i>
<h2 class="result-title">회원가입 신청이 완료되었습니다.</h2>
</div>
<!-- Info Box -->
<div class="result-info-box">
<p class="info-text">
API Portal 서비스를 이용하기 위해서<br>
<strong>이메일 인증</strong>을 완료해 주세요.
</p>
</div>
</div>
<!-- Action Buttons -->
<div class="form-actions">
<a th:href="@{/}" class="submit-button">홈으로</a>
</div>
</div>
</div>
</div>
</th:block> </th:block>
</body> </body>
<th:block layout:fragment="contentScript">
</th:block>
</html> </html>