-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathedit.html
More file actions
31 lines (30 loc) · 1.3 KB
/
edit.html
File metadata and controls
31 lines (30 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html lang="ja" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{layout::base_header('商品編集')}">
</head>
<body>
<div class="container">
<h2>商品編集</h2>
<form th:action="@{/items/{id}/update(id=${item.id})}" method="post">
<div class="form-group mb-3">
<label for="barcode">バーコード</label>
<input type="text" class="form-control" id="barcode" name="barcode" th:value="${item.barcode}" required>
</div>
<div class="form-group mb-3">
<label for="name">商品名</label>
<input type="text" class="form-control" id="name" name="name" th:value="${item.name}" required>
</div>
<div class="form-group mb-3">
<label for="price">値段</label>
<input type="number" class="form-control" id="price" name="price" th:value="${item.price}" required>
</div>
<button type="submit" class="btn btn-primary">更新</button>
<a href="/items" class="btn btn-secondary">キャンセル</a>
</form>
<form th:action="@{/items/{id}/delete(id=${item.id})}" method="post" class="mt-3"
onsubmit="return confirm('この商品を削除しますか?')">
<button type="submit" class="btn btn-danger">削除</button>
</form>
</div>
</body>
</html>