-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocalStorage-products.html
117 lines (112 loc) · 5.86 KB
/
localStorage-products.html
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>
<div class="row">
<div class="col-md-3 offset-md-1 pt-5">
<div id="addProductForm">
<h3 class="pb-3">Add Product</h3>
<form class="form" id="addproduct">
<div class="form-group">
<label for='pdname'>Poduct name: </label>
<input class="form-control" id="pdname" type="text">
</div>
<div class="form-group">
<label for='pdcategory'>Category: </label>
<select class="form-control" name="pdcategory">
<option value="Womens Formalwear">Womens Formalwear</option>
<option value="Mens Formalwear">Mens Formalwear</option>
<option value="Womens Footwear">Womens Footwear</option>
<option value="Mens Footwear">Mens Footwear</option>
<option value="Womens Casualwear">Womens Casualwear</option>
<option value="Mens Casualwear">Mens Casualwear</option>
</select>
</div>
<div class="form-group">
<label for='pdprice'>Price: </label>
<input class="form-control" id="pdprice" type="number">
</div>
<div class="form-group">
<label for='pdavailable'>Available: </label>
<select class="form-control" name="pdavailable">
<option value="Available">Available</option>
<option value="Not available">Not available</option>
</select>
</div>
<div class="form-group">
<label for='pdstock'>Stock: </label>
<input class="form-control" id="pdstock" type="number">
</div>
<div class="form-group">
<label for='pdimage'>Image: </label>
<input class="form-control-file" id="pdimage" type="file" accept="image/*">
</div>
<input class="btn btn-primary" type="button" onclick="addProduct()" value="Add" style="width:50%;float:right">
</form>
</div>
<div id="editProductForm" hidden>
<h3 class="pb-3">Edit Product</h3>
<form class="form" id="editproduct">
<div class="form-group">
<label for='pdname'>Poduct name: </label>
<input class="form-control" id="pdname" type="text">
</div>
<div class="form-group">
<label for='pdcategory'>Category: </label>
<select class="form-control" name="pdcategory">
<option value="Womens Formalwear">Womens Formalwear</option>
<option value="Mens Formalwear">Mens Formalwear</option>
<option value="Womens Footwear">Womens Footwear</option>
<option value="Mens Footwear">Mens Footwear</option>
<option value="Womens Casualwear">Womens Casualwear</option>
<option value="Mens Casualwear">Mens Casualwear</option>
</select>
</div>
<div class="form-group">
<label for='pdprice'>Price: </label>
<input class="form-control" id="pdprice" type="number">
</div>
<div class="form-group">
<label for='pdavailable'>Available: </label>
<select class="form-control" name="pdavailable">
<option value="Available">Available</option>
<option value="Not available">Not available</option>
</select>
</div>
<div class="form-group">
<label for='pdstock'>Stock: </label>
<input class="form-control" id="pdstock" type="number">
</div>
<div class="form-group">
<label for='pdimage'>Image: </label>
<input class="form-control-file" id="pdimage" type="file" accept="image/*">
</div>
<input class="btn btn-warning" type="button" onclick="updateProduct()" value="Update" style="width:50%;float:right">
</form>
</div>
<h3 class="pt-5 pb-3">Test</h3>
<input class="btn btn-secondary" type="button" onclick="loadSamples()" value="Load samples">
</div>
<div class="pt-3 col-md-8">
<div style="float:left">
<h3 class="pb-3">List of products</h3>
</div>
<div class="pr-3" style="float:right">
<input type="button" onclick="searchForProduct()" value="Search" class="btn btn-primary">
</div>
<div class="pr-3" style="float:right">
<input id="searchinput" type="text" value="" class="form-control" placeholder="Search...">
</div>
<div id="productslist"></div>
</div>
</div>
<script src="localStorage-products.js"></script>
<script>loadProducts()</script>
</body>
</html>