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