diff --git a/views/product.ejs b/views/product.ejs index f0d89b1fa9c4e22169fa0e5a56fd8ca6eb1f7563..89544e9c879c70836755c96c37eaa8a63e12b5b9 100644 --- a/views/product.ejs +++ b/views/product.ejs @@ -6,7 +6,7 @@ </head> <body> <h2>เธฃเธฒเธขเธเธฒเธฃเธชเธดเธเธเนเธฒ</h2> - <a href="/products/add">เน€เธเธดเนเธกเธชเธดเธเธเนเธฒ</a> + <a href="/products/add">Add Product</a> <table border="1"> <tr> <th>เธฃเธนเธ</th> diff --git a/views/product_add.ejs b/views/product_add.ejs index 36ff74ac325da876e8ed2aa25f10390e26040747..d6cde2a4e0b6a007eb276e084296369d2b4f9fd9 100644 --- a/views/product_add.ejs +++ b/views/product_add.ejs @@ -2,25 +2,25 @@ <html lang="th"> <head> <meta charset="UTF-8"> - <title>เน€เธเธดเนเธกเธชเธดเธเธเนเธฒ</title> + <title>Add Product</title> </head> <body> - <h2>เน€เธเธดเนเธกเธชเธดเธเธเนเธฒ</h2> + <h2>Add Product</h2> <form action="/products/add" method="POST" enctype="multipart/form-data"> - <label>เธเธทเนเธญเธชเธดเธเธเนเธฒ:</label> + <label>name:</label> <input type="text" name="name" required> <br> - <label>เธฃเธฒเธเธฒ:</label> + <label>price:</label> <input type="number" name="price" required> <br> - <label>เธเธณเธเธงเธเธชเธดเธเธเนเธฒ:</label> + <label>stock:</label> <input type="number" name="stock" required> <br> - <label>เธเธณเธเธฃเธฃเธขเธฒเธขเธชเธดเธเธเนเธฒ:</label> + <label>description:</label> <textarea name="description" required><%= product.description %></textarea> <br> - <label>เน€เธฅเธทเธญเธเนเธเธฅเนเธฃเธนเธเธชเธดเธเธเนเธฒ:</label> - <input type="file" name="image" required> + <label>image:</label> + <input type="file" name="image_url" required> <br> <button type="submit">เน€เธเธดเนเธกเธชเธดเธเธเนเธฒ</button> diff --git a/views/product_edit.ejs b/views/product_edit.ejs index a54f07b40c43dd0a1a15f8baec91b8d429ecd5a3..ec6197a4c57e5165c5289c0b287f8fee093b8370 100644 --- a/views/product_edit.ejs +++ b/views/product_edit.ejs @@ -2,37 +2,37 @@ <html lang="th"> <head> <meta charset="UTF-8"> - <title>เนเธเนเนเธเธชเธดเธเธเนเธฒ</title> + <title>Edit</title> </head> <body> - <h2>เนเธเนเนเธเธชเธดเธเธเนเธฒ</h2> + <h2>Edit</h2> <form action="/products/edit/<%= product.id %>" method="POST" enctype="multipart/form-data"> - <label>เธฃเธซเธฑเธชเธชเธดเธเธเนเธฒ:</label> + <label>product_id:</label> <input type="text" name="product_id" value="<%= product.id %>" readonly> <br> - <label>เธเธทเนเธญเธชเธดเธเธเนเธฒ:</label> + <label>name:</label> <input type="text" name="name" value="<%= product.name %>" required> <br> - <label>เธฃเธฒเธเธฒ:</label> + <label>price:</label> <input type="number" name="price" value="<%= product.price %>" required> <br> - <label>เธเธณเธเธงเธเธชเธดเธเธเนเธฒ:</label> + <label>stock:</label> <input type="number" name="stock" value="<%= product.stock %>" required> <br> - <label>เธเธณเธเธฃเธฃเธขเธฒเธขเธชเธดเธเธเนเธฒ:</label> + <label>description:</label> <textarea name="description" required><%= product.description %></textarea> <br> - <label>เน€เธเธฅเธตเนเธขเธเธฃเธนเธเธ เธฒเธ (เธญเธฑเธเนเธซเธฅเธ”เนเธซเธกเนเธ–เนเธฒเธ•เนเธญเธเธเธฒเธฃ):</label> - <input type="file" name="image"> + <label>image:</label> + <input type="file" name="image_url"> <br> - <button type="submit">เธเธฑเธเธ—เธถเธเธเธฒเธฃเนเธเนเนเธ</button> + <button type="submit">submit</button> </form> </body> </html>