[ADD]目標を管理するため機能の追加
This commit is contained in:
41
src/main/resources/templates/goal_edit.html
Normal file
41
src/main/resources/templates/goal_edit.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>目標編集</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>目標編集</h1>
|
||||
|
||||
<form th:action="@{/goal/update}" th:object="${goalForm}" method="post">
|
||||
|
||||
<input type="hidden" th:field="*{goalId}">
|
||||
|
||||
<div>
|
||||
<label>目標名</label>
|
||||
<input type="text" th:field="*{goalTitle}">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label>目標補足説明</label>
|
||||
<textarea th:field="*{goalSubtitle}"></textarea>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label>目標金額</label>
|
||||
<input type="number" th:field="*{targetAmount}">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label>目標達成期限</label>
|
||||
<input type="date" th:field="*{deadline}">
|
||||
</div>
|
||||
|
||||
|
||||
<button type="submit">更新する</button>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
33
src/main/resources/templates/goal_view.html
Normal file
33
src/main/resources/templates/goal_view.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>目標詳細</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>目標詳細</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>目標名</th>
|
||||
<td th:text="${goalForm.goalTitle}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>目標補足説明</th>
|
||||
<td th:text="${goalForm.goalSubtitle}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>目標金額</th>
|
||||
<td th:text="${goalForm.targetAmount}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>目標達成期限</th>
|
||||
<td th:text="${goalForm.deadline}"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<a th:href="@{/goal/{goalId}/edit(goalId=${goalForm.goalId})}">編集する</a>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user