Compare commits
11 Commits
1759c45fea
...
52fe77a5b4
| Author | SHA1 | Date | |
|---|---|---|---|
| 52fe77a5b4 | |||
| ac85c2dc23 | |||
|
|
21ca1a72e2 | ||
|
|
56bb709921 | ||
|
|
e2ddffcc60 | ||
|
|
51310bae25 | ||
|
|
08c2c06f4a | ||
|
|
06c2d35512 | ||
|
|
4192faecc2 | ||
|
|
19218d868c | ||
| 8282331339 |
@@ -10,4 +10,5 @@ public interface CourseService {
|
||||
|
||||
public CourseModel findById(Long courseId);
|
||||
|
||||
public Long findByName(String courName);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.example.demo.app.domain.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.example.demo.app.infra.entity.QuestionEntity;
|
||||
|
||||
public interface QuestionService {
|
||||
public List<QuestionEntity> findAll();
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import com.example.demo.app.presentation.form.UserForm;
|
||||
|
||||
public interface UserService {
|
||||
|
||||
void register(UserForm userForm);
|
||||
void register(UserForm userForm, Long courseId);
|
||||
|
||||
public void updateCourse(Long userId, Long courseId);
|
||||
|
||||
|
||||
@@ -25,4 +25,8 @@ public class CourseServiceImpl implements CourseService {
|
||||
public CourseModel findById(Long courseId) {
|
||||
return CourseModel.convertFrom(courseRepository.findByCourseId(courseId));
|
||||
}
|
||||
|
||||
public Long findByName(String courseName) {
|
||||
return courseRepository.findByCourseName(courseName).getCourseId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.example.demo.app.domain.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.example.demo.app.domain.service.QuestionService;
|
||||
import com.example.demo.app.infra.entity.QuestionEntity;
|
||||
import com.example.demo.app.infra.repository.QuestionRepository;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class QuestionServiceImpl implements QuestionService{
|
||||
|
||||
private final QuestionRepository questionRepository;
|
||||
|
||||
public List<QuestionEntity> findAll() {
|
||||
return questionRepository.findAll();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,7 +26,7 @@ public class UserServiceImpl implements UserService {
|
||||
private final CourseRepository courseRepository;
|
||||
|
||||
@Override
|
||||
public void register(UserForm userForm) {
|
||||
public void register(UserForm userForm, Long courseId) {
|
||||
|
||||
UserEntity userEntity = new UserEntity();
|
||||
|
||||
@@ -48,7 +48,7 @@ public class UserServiceImpl implements UserService {
|
||||
goalRepository.findById(userForm.getGoalId()).orElse(null);
|
||||
|
||||
CourseEntity courseEntity =
|
||||
courseRepository.findById(userForm.getCourseId()).orElse(null);
|
||||
courseRepository.findById(courseId).orElse(null);
|
||||
|
||||
userEntity.setQuestionEntity(questionEntity);
|
||||
userEntity.setGoalEntity(goalEntity);
|
||||
|
||||
@@ -10,5 +10,8 @@ public interface CourseRepository extends JpaRepository<CourseEntity, Long> {
|
||||
@Query("SELECT c FROM CourseEntity c WHERE c.courseId = :courseId ")
|
||||
public CourseEntity findByCourseId(Long courseId);
|
||||
|
||||
@Query("SELECT c FROM CourseEntity c WHERE c.courseName = :courseName ")
|
||||
public CourseEntity findByCourseName(String courseName);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@ import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import com.example.demo.aop.aspect.SessionCheck;
|
||||
import com.example.demo.app.domain.model.AuthenticationModel;
|
||||
import com.example.demo.app.domain.service.AuthenticationService;
|
||||
import com.example.demo.app.infra.repository.QuestionRepository;
|
||||
import com.example.demo.app.presentation.form.AuthenticationForm;
|
||||
import com.example.demo.app.presentation.form.PasswordResetForm;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -22,7 +22,6 @@ public class AuthenticationController {
|
||||
private final AuthenticationService authenticationService;
|
||||
private final QuestionRepository questionRepository;
|
||||
|
||||
@SessionCheck
|
||||
@GetMapping("/authentication")
|
||||
public String showAuthentication(Model model) {
|
||||
|
||||
@@ -32,7 +31,6 @@ public class AuthenticationController {
|
||||
return "authentication";
|
||||
}
|
||||
|
||||
@SessionCheck
|
||||
@PostMapping("/authentication")
|
||||
public String authenticate(
|
||||
AuthenticationForm authenticationForm,
|
||||
@@ -53,6 +51,10 @@ public class AuthenticationController {
|
||||
"passwordResetUserId",
|
||||
authenticationModel.getUserId());
|
||||
|
||||
model.addAttribute(
|
||||
"passwordResetForm",
|
||||
new PasswordResetForm());
|
||||
|
||||
return "password_reset";
|
||||
|
||||
}
|
||||
|
||||
@@ -39,12 +39,10 @@ public class CourseController {
|
||||
private final UserService userService;
|
||||
|
||||
|
||||
@SessionCheck
|
||||
@GetMapping("/course/select/register")
|
||||
@PostMapping("/course/select/register")
|
||||
public String showSelectCourse(@ModelAttribute UserForm userForm, Model model, HttpSession session) {
|
||||
|
||||
try {
|
||||
System.out.println(userForm.getMailAddress());
|
||||
|
||||
session.setAttribute("userForm", userForm);
|
||||
model.addAttribute("mode", "regist");
|
||||
|
||||
@@ -7,6 +7,7 @@ import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import com.example.demo.app.domain.model.LoginModel;
|
||||
import com.example.demo.app.domain.service.PasswordResetService;
|
||||
import com.example.demo.app.presentation.form.PasswordResetForm;
|
||||
|
||||
@@ -25,29 +26,45 @@ public class PasswordResetController {
|
||||
|
||||
@PostMapping("/password/reset")
|
||||
public String resetPassword(
|
||||
PasswordResetForm passwordResetForm,
|
||||
Model model,
|
||||
HttpSession session){
|
||||
|
||||
Long userId =
|
||||
(Long) session.getAttribute("passwordResetUserId");
|
||||
|
||||
if(userId == null) {
|
||||
return "redirect:/login";
|
||||
}
|
||||
|
||||
boolean isReset =
|
||||
passwordResetService.resetPassword(userId, passwordResetForm);
|
||||
|
||||
if(!isReset) {
|
||||
model.addAttribute("Message", "パスワードが一致しません。");
|
||||
return "password_reset";
|
||||
}
|
||||
|
||||
session.removeAttribute("passwordResetUserId");
|
||||
|
||||
return "redirect:/login";
|
||||
PasswordResetForm passwordResetForm,
|
||||
Model model,
|
||||
HttpSession session){
|
||||
|
||||
Long userId =
|
||||
(Long) session.getAttribute("passwordResetUserId");
|
||||
|
||||
if (userId == null) {
|
||||
LoginModel loginUser =
|
||||
(LoginModel) session.getAttribute("loginUser");
|
||||
|
||||
if (loginUser != null) {
|
||||
userId = loginUser.getUserId();
|
||||
}
|
||||
}
|
||||
|
||||
if (userId == null) {
|
||||
return "redirect:/login";
|
||||
}
|
||||
|
||||
boolean isReset =
|
||||
passwordResetService.resetPassword(userId, passwordResetForm);
|
||||
|
||||
System.out.println("isReset=" + isReset);
|
||||
|
||||
if(!isReset) {
|
||||
model.addAttribute("Message", "パスワードが一致しません。");
|
||||
return "password_reset";
|
||||
}
|
||||
|
||||
session.removeAttribute("passwordResetUserId");
|
||||
|
||||
LoginModel loginUser =
|
||||
(LoginModel) session.getAttribute("loginUser");
|
||||
|
||||
if (loginUser != null) {
|
||||
return "redirect:/menu";
|
||||
}
|
||||
|
||||
return "redirect:/login";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.example.demo.app.presentation.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.servlet.http.HttpSession;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
@@ -10,66 +12,82 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import com.example.demo.app.domain.service.CourseService;
|
||||
import com.example.demo.app.domain.service.QuestionService;
|
||||
import com.example.demo.app.domain.service.UserService;
|
||||
import com.example.demo.app.infra.entity.QuestionEntity;
|
||||
import com.example.demo.app.presentation.form.UserForm;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
|
||||
@Controller
|
||||
@RequiredArgsConstructor
|
||||
public class UserController {
|
||||
|
||||
|
||||
private final UserService userService;
|
||||
|
||||
private final CourseService courseService;
|
||||
|
||||
|
||||
private final QuestionService questionService;
|
||||
|
||||
|
||||
@GetMapping("/user/register")
|
||||
public String showRegister(Model model, HttpSession session) {
|
||||
UserForm userForm = new UserForm();
|
||||
|
||||
|
||||
List<QuestionEntity> questionList = questionService.findAll();
|
||||
|
||||
session.setAttribute("questionList", questionList);
|
||||
|
||||
model.addAttribute("userForm", userForm);
|
||||
return "user_register";
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/user/register/return")
|
||||
public String showRegisterReturn(@RequestParam(required = false) Long courseId, Model model, HttpSession session) {
|
||||
|
||||
|
||||
UserForm userForm = (UserForm) session.getAttribute("userForm");
|
||||
|
||||
if(userForm == null) {
|
||||
userForm = new UserForm();
|
||||
System.out.println(
|
||||
"######################################################################3" + userForm.getBirthDate());
|
||||
|
||||
if (userForm.getUserName().equals("")) {
|
||||
userForm = new UserForm();
|
||||
userForm.setCourseId(courseId);
|
||||
}
|
||||
|
||||
if(courseId != null) {
|
||||
|
||||
if (courseId != null) {
|
||||
model.addAttribute("selectedCourseName", courseService.findById(courseId).getCourseName());
|
||||
}
|
||||
|
||||
|
||||
session.setAttribute("selectedCourseName", courseService.findById(courseId).getCourseName());
|
||||
model.addAttribute("courseId", courseId);
|
||||
System.out.println(
|
||||
"######################################################################3" + userForm.getBirthDate());
|
||||
model.addAttribute("userForm", userForm);
|
||||
|
||||
return "user_register_return";
|
||||
}
|
||||
|
||||
@GetMapping("/user/register/confirm")
|
||||
public String confirmRegisterGet(@ModelAttribute UserForm userForm,
|
||||
String selectedCourseName, Model model,
|
||||
HttpSession session) {
|
||||
|
||||
model.addAttribute("selectedCourseName", (String) session.getAttribute("selectedCourseName"));
|
||||
return "user_register_confirm";
|
||||
|
||||
return "user_register";
|
||||
}
|
||||
|
||||
@PostMapping("/user/register/confirm")
|
||||
public String confirmRegister(
|
||||
@ModelAttribute UserForm userForm,
|
||||
HttpSession session) {
|
||||
|
||||
session.setAttribute("userForm", userForm);
|
||||
|
||||
return "user_register_confirm";
|
||||
}
|
||||
|
||||
@PostMapping("/user/register/complete")
|
||||
public String completeRegister(HttpSession session) {
|
||||
public String confirmRegister(
|
||||
@ModelAttribute UserForm userForm,
|
||||
Model model,
|
||||
HttpSession session) {
|
||||
|
||||
UserForm userForm =
|
||||
(UserForm) session.getAttribute("userForm");
|
||||
|
||||
// DBへの登録処理
|
||||
|
||||
session.removeAttribute("userForm");
|
||||
|
||||
return "redirect:/login";
|
||||
Long courseId = courseService.findByName((String) session.getAttribute("selectedCourseName"));
|
||||
|
||||
userService.register(userForm, courseId);
|
||||
|
||||
return "redirect:/login";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,6 @@ import lombok.NoArgsConstructor;
|
||||
@NoArgsConstructor
|
||||
public class AuthenticationForm {
|
||||
private String mailAddress;
|
||||
private Integer secretQuestionId;
|
||||
private Long secretQuestionId;
|
||||
private String secretAnswer;
|
||||
}
|
||||
|
||||
@@ -14,10 +14,10 @@ import lombok.NoArgsConstructor;
|
||||
public class UserForm {
|
||||
private String userName;
|
||||
private String mailAddress;
|
||||
private LocalDate birthDate;
|
||||
private String password;
|
||||
private Long secretQuestionId;
|
||||
private String SecretAnswer;
|
||||
private LocalDate birthDate;
|
||||
private String secretAnswer;
|
||||
private Integer saving;
|
||||
private Integer annualIncome;
|
||||
private Integer monthlyBudget;
|
||||
@@ -29,10 +29,10 @@ public class UserForm {
|
||||
return new UserForm(
|
||||
userModel.getUserName(),
|
||||
userModel.getMailAddress(),
|
||||
userModel.getBrithDate(),
|
||||
userModel.getPassword(),
|
||||
userModel.getSecretQuestionId(),
|
||||
userModel.getSecretAnswer(),
|
||||
userModel.getBrithDate(),
|
||||
userModel.getSaving(),
|
||||
userModel.getAnnualIncome(),
|
||||
userModel.getMonthlyBudget(),
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
<button type="submit">再設定</button>
|
||||
</form>
|
||||
|
||||
<div th:if="${errorMessage}">
|
||||
<p th:text="${errorMessage}"></p>
|
||||
<div th:if="${Message}">
|
||||
<p th:text="${Message}"></p>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
<form th:action="${mode == 'regist'} ? @{/user/register/return}: @{/change}" method="post">
|
||||
<button type="submit">確定</button>
|
||||
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div class="accordion-item" th:each="course:${courseList}">
|
||||
<h2 class="accordion-header d-flex align-items-center">
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<main>
|
||||
<h1>新規会員登録</h1>
|
||||
|
||||
<form th:action="@{/user/register/confirm}" th:object="${userForm}" method="post">
|
||||
<form th:action="@{/course/select/register}" th:object="${userForm}" method="post">
|
||||
<div>
|
||||
<label for="userName">氏名</label>
|
||||
<input type="text"
|
||||
@@ -54,7 +54,7 @@
|
||||
th:field="*{secretQuestionId}"
|
||||
required>
|
||||
<option value="">選択してください</option>
|
||||
<option th:each="question : ${questionList}"
|
||||
<option th:each="question : ${session.questionList}"
|
||||
th:value="${question.secretQuestionId}"
|
||||
th:text="${question.questionText}">
|
||||
</option>
|
||||
@@ -109,8 +109,7 @@
|
||||
<div>
|
||||
<label>コース</label>
|
||||
<input type="hidden" th:field="*{courseId}">
|
||||
<span th:text="${selectedCourseName}">未選択</span>
|
||||
<button type="submit"onclick="location.href='/course/select/register'">コース選択</button>
|
||||
<button type="submit">コース選択</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
@@ -1,79 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>新規会員登録確認</title>
|
||||
<meta charset="UTF-8">
|
||||
<title>新規会員登録確認</title>
|
||||
</head>
|
||||
|
||||
<body class="pb-5 pt-5">
|
||||
<div th:replace="~{header :: header}">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<main>
|
||||
<h1>新規会員登録確認</h1>
|
||||
|
||||
<div>
|
||||
<p>氏名</p>
|
||||
<p th:text="${user.userName}"></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>メールアドレス</p>
|
||||
<p th:text="${user.mailAddress}"></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>生年月日</p>
|
||||
<p th:text="${user.birthDate}"></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>パスワード</p>
|
||||
<p>********</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>秘密の質問</p>
|
||||
<p th:text="${user.secretQuestionId}"></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>秘密の質問の回答</p>
|
||||
<p th:text="${user.secretAnswer}"></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>貯蓄金</p>
|
||||
<p th:text="${user.saving}"></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>年収</p>
|
||||
<p th:text="${user.annualIncome}"></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>月別使用可能額</p>
|
||||
<p th:text="${user.monthlyBudget}"></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>目標</p>
|
||||
<p th:text="${user.goalId}"></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>コース</p>
|
||||
<p th:text="${user.courseId}"></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<form th:action="@{/user/register}" method="get">
|
||||
<button type="submit">戻る</button>
|
||||
</form>
|
||||
</div>
|
||||
<form th:action="@{/user/register/complete}" method="post">
|
||||
<button type="submit">確定</button>
|
||||
|
||||
<form th:action="@{/user/register/complete}" th:object="${userForm}" method="post">
|
||||
<div>
|
||||
<label for="userName">氏名</label>
|
||||
<input type="text" id="userName" th:field="*{userName}" maxlength="100" readonly>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="mailAddress">メールアドレス</label>
|
||||
<input type="email" id="mailAddress" th:field="*{mailAddress}" maxlength="255" readonly>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="birthDate">生年月日</label>
|
||||
<input type="date" id="birthDate" name="birthDate" th:value="*{birthDate}" required readonly>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="password">パスワード</label>
|
||||
<input type="password" id="password" name="password" th:value="*{password}" minlength="8"
|
||||
maxlength="255" required readonly>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="secretQuestionId">秘密の質問</label>
|
||||
<select id="secretQuestionId" th:field="*{secretQuestionId}" required readonly>
|
||||
<option value="">選択してください</option>
|
||||
<option th:each="question : ${session.questionList}" th:value="${question.secretQuestionId}"
|
||||
th:text="${question.questionText}">
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="secretAnswer">秘密の質問の回答</label>
|
||||
<input type="text" id="secretAnswer" th:field="*{secretAnswer}" maxlength="100" readonly>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="saving">貯蓄金</label>
|
||||
<input type="number" id="saving" th:field="*{saving}" min="0" readonly>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="annualIncome">年収</label>
|
||||
<input type="number" id="annualIncome" th:field="*{annualIncome}" min="0" readonly>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="monthlyBudget">月別使用可能金額</label>
|
||||
<input type="number" id="monthlyBudget" th:field="*{monthlyBudget}" min="0" readonly>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="goalId">目標</label>
|
||||
<input type="number" id="goalId" th:field="*{goalId}" min="0" readonly>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label>コース</label>
|
||||
<input type="hidden" th:field="*{courseId}">
|
||||
<span th:text="${selectedCourseName}">未選択</span>
|
||||
<button type="submit">コース選択</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="submit">作成</button>
|
||||
</div>
|
||||
<div>
|
||||
<form th:action="@{/user/register}" method="get">
|
||||
<button type="submit">戻る</button>
|
||||
</form>
|
||||
</div>
|
||||
<form th:action="@{/user/register/complete}" method="post">
|
||||
<button type="submit">確定</button>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
|
||||
</main>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
126
src/main/resources/templates/user_register_return.html
Normal file
126
src/main/resources/templates/user_register_return.html
Normal file
@@ -0,0 +1,126 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja"xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>新規会員登録</title>
|
||||
</head>
|
||||
<body class="pb-5 pt-5">
|
||||
<div th:replace="~{header :: header}">
|
||||
</div>
|
||||
|
||||
<main>
|
||||
<h1>新規会員登録</h1>
|
||||
|
||||
<form th:action="@{/user/register/confirm}" th:object="${userForm}" method="get">
|
||||
<div>
|
||||
<label for="userName">氏名</label>
|
||||
<input type="text"
|
||||
id="userName"
|
||||
th:field="*{userName}"
|
||||
maxlength="100"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="mailAddress">メールアドレス</label>
|
||||
<input type="email"
|
||||
id="mailAddress"
|
||||
th:field="*{mailAddress}"
|
||||
maxlength="255"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="birthDate">生年月日</label>
|
||||
<input type="date" id="birthDate" name="birthDate" th:value="*{birthDate}"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="password">パスワード</label>
|
||||
<input type="password"
|
||||
id="password"
|
||||
name="password"
|
||||
th:value="*{password}"
|
||||
minlength="8"
|
||||
maxlength="255"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="secretQuestionId">秘密の質問</label>
|
||||
<select id="secretQuestionId"
|
||||
th:field="*{secretQuestionId}"
|
||||
required>
|
||||
<option value="">選択してください</option>
|
||||
<option th:each="question : ${session.questionList}"
|
||||
th:value="${question.secretQuestionId}"
|
||||
th:text="${question.questionText}">
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="secretAnswer">秘密の質問の回答</label>
|
||||
<input type="text"
|
||||
id="secretAnswer"
|
||||
th:field="*{secretAnswer}"
|
||||
maxlength="100"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="saving">貯蓄金</label>
|
||||
<input type="number"
|
||||
id="saving"
|
||||
th:field="*{saving}"
|
||||
min="0"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="annualIncome">年収</label>
|
||||
<input type="number"
|
||||
id="annualIncome"
|
||||
th:field="*{annualIncome}"
|
||||
min="0"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="monthlyBudget">月別使用可能金額</label>
|
||||
<input type="number"
|
||||
id="monthlyBudget"
|
||||
th:field="*{monthlyBudget}"
|
||||
min="0"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="goalId">目標</label>
|
||||
<input type="number"
|
||||
id="goalId"
|
||||
th:field="*{goalId}"
|
||||
min="0"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label>コース</label>
|
||||
<input type="hidden" th:field="*{courseId}">
|
||||
<span th:text="${selectedCourseName}">未選択</span>
|
||||
<button type="submit">コース選択</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="submit">作成</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form th:action="@{/login}" method="get">
|
||||
<button type="submit">戻る</button>
|
||||
</form>
|
||||
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user