diff --git a/src/main/java/com/matdongsan/web/controller/account/ProfileController.java b/src/main/java/com/matdongsan/web/controller/account/ProfileController.java index 244601bc..325c3750 100644 --- a/src/main/java/com/matdongsan/web/controller/account/ProfileController.java +++ b/src/main/java/com/matdongsan/web/controller/account/ProfileController.java @@ -69,6 +69,7 @@ public String changeNickname(@ModelAttribute(value = "nickname") String nickname @PostMapping("/profile/change/password") public String changePassword(@Valid ProfilePasswordDto profilePasswordDto, BindingResult bindingResult, @AuthUser Account account, RedirectAttributes redirectAttributes) { if (bindingResult.hasErrors() || !accountService.checkAccountPassword(profilePasswordDto.getOriginalPassword(), account)) { + redirectAttributes.addFlashAttribute("profilePasswordDto", profilePasswordDto); redirectAttributes.addFlashAttribute("settingMessageError", "비밀번호를 확인해주세요."); return "redirect:/profile/setting"; } diff --git a/src/main/resources/templates/profile/profile-setting.html b/src/main/resources/templates/profile/profile-setting.html index da8b9dc5..97e494a4 100755 --- a/src/main/resources/templates/profile/profile-setting.html +++ b/src/main/resources/templates/profile/profile-setting.html @@ -16,7 +16,7 @@

- Account settings + 계정 설정

@@ -28,9 +28,9 @@

@@ -59,13 +59,15 @@
- - - +
+ + +
+

변경할 닉네임을 입력해주세요.

@@ -124,7 +126,9 @@ $("#dupplicateMsg").text("이미 사용중인 ID 입니다.") .addClass("text-danger") .removeClass("text-primary"); - $("#nicknameSubmitBtn").attr("type", "button"); + $("#nicknameSubmitBtn").attr("type", "button") + .addClass("btn-secondary") + .removeClass("btn-primary"); } else { idChk = true; console.log("idChk : " + idChk); @@ -133,7 +137,9 @@ .removeClass("text-danger"); $("#nickname").attr("readonly", "true") .addClass("bg-light"); - $("#nicknameSubmitBtn").attr("type", "submit"); + $("#nicknameSubmitBtn").attr("type", "submit") + .addClass("btn-primary") + .removeClass("btn-secondary"); } }, });