Gitlab@Informatics
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cloudupdate_prj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
65160270
cloudupdate_prj
Commits
96a1d042
Commit
96a1d042
authored
2 months ago
by
65160270
Browse files
Options
Downloads
Patches
Plain Diff
update-cart
parent
a2671713
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
shop-routes/product.js
+1
-1
1 addition, 1 deletion
shop-routes/product.js
views/product_add.ejs
+9
-9
9 additions, 9 deletions
views/product_add.ejs
with
10 additions
and
10 deletions
shop-routes/product.js
+
1
−
1
View file @
96a1d042
...
@@ -37,7 +37,7 @@ router.get("/", async (req, res) => {
...
@@ -37,7 +37,7 @@ router.get("/", async (req, res) => {
// แสดงฟอร์มเพิ่มสินค้า
// แสดงฟอร์มเพิ่มสินค้า
router
.
get
(
"
/add
"
,
(
req
,
res
)
=>
{
router
.
get
(
"
/add
"
,
(
req
,
res
)
=>
{
res
.
render
(
"
product_add
"
,
{
message
:
""
});
res
.
render
(
"
product_add
"
,
{
product
:
{},
message
:
""
});
});
});
// เพิ่มสินค้าใหม่พร้อมรูป
// เพิ่มสินค้าใหม่พร้อมรูป
...
...
This diff is collapsed.
Click to expand it.
views/product_add.ejs
+
9
−
9
View file @
96a1d042
...
@@ -2,25 +2,25 @@
...
@@ -2,25 +2,25 @@
<html
lang=
"th"
>
<html
lang=
"th"
>
<head>
<head>
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
>
<title>
Add Product
</title>
<title>
เพิ่มสินค้า
</title>
</head>
</head>
<body>
<body>
<h2>
Add Product
</h2>
<h2>
เพิ่มสินค้า
</h2>
<form
action=
"/products/add"
method=
"POST"
enctype=
"multipart/form-data"
>
<form
action=
"/products/add"
method=
"POST"
enctype=
"multipart/form-data"
>
<label>
name
:
</label>
<label>
ชื่อสินค้า
:
</label>
<input
type=
"text"
name=
"name"
required
>
<input
type=
"text"
name=
"name"
required
>
<br>
<br>
<label>
price
:
</label>
<label>
ราคา
:
</label>
<input
type=
"number"
name=
"price"
required
>
<input
type=
"number"
name=
"price"
required
>
<br>
<br>
<label>
stock
:
</label>
<label>
จำนวนสินค้า
:
</label>
<input
type=
"number"
name=
"stock"
required
>
<input
type=
"number"
name=
"stock"
required
>
<br>
<br>
<label>
description
:
</label>
<label>
คำบรรยายสินค้า
:
</label>
<textarea
name=
"description"
required
><
%=
product.description
%
></textarea>
<textarea
name=
"description"
required
><
%=
product
?
product.description
:
""
%
></textarea>
<br>
<br>
<label>
image
:
</label>
<label>
เลือกไฟล์รูปสินค้า
:
</label>
<input
type=
"file"
name=
"image
_url
"
required
>
<input
type=
"file"
name=
"image"
required
>
<br>
<br>
<button
type=
"submit"
>
เพิ่มสินค้า
</button>
<button
type=
"submit"
>
เพิ่มสินค้า
</button>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment