Files
coursera-ibm-java-developer…/RetailManagementSystem/front-end/add-product.html

97 lines
3.2 KiB
HTML
Raw Normal View History

2025-11-02 19:25:39 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IMS: Manage Inventory
</title>
<!-- Latest compiled and minified CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Latest compiled JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="frontend.css">
<link rel="shortcut icon" href="images/Logo.png" type="image/x-icon">
<script src="script.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
<div id="navitem">
<a class="navbar-brand" href="#">
<img src="images/Logo.png" alt="Avatar Logo" class="rounded-pill">
</a>
<div id="head">
<h1 style="color: white;">Add Product </h1>
</div>
</div>
</nav>
<div id="form" style="display: flex;">
<form id="myform" onsubmit="addProductToInventory(event)">
<label for="astoreId"> Store Id</label>
<input type="text" name="astoreId" id="astoreId" required disabled>
<label for="productName"> Product Name</label>
<input type="text" name="productName" id="productName" placeholder=" Product Name" required
onkeyup="fillProductName()">
<div id="aStoreSuggestion" style="margin-bottom: 10px;">
</div>
<label for="productId"> Product Id</label>
<input type="text" name="productId" id="productId" placeholder=" Product Id" required disabled>
<label for="category">Select Category</label>
<select name="category" class="category" id="category" required disabled>
<option value="" selected disabled>Select category</option>
<option value="Mobile">Mobile </option>
<option value="TV and AV">TV and AV</option>
<option value="Home Appliances">Home Appliances</option>
<option value="Laptops and Monitors">Laptops and Monitors</option>
<option value="Accessories">Accessories</option>
</select>
<label for="productPrice"> Product's Price</label disabled>
<input type="text" name="productPrice" id="productPrice" placeholder=" price in $" required disabled>
<label for="SKU"> Product's SKU</label>
<input type="text" name="SKU" id="SKU" placeholder=" SKU" required disabled>
<label for="astockLevel"> Product's Stock Level</label>
<input type="text" name="astockLevel" id="astockLevel" placeholder=" Stock Level">
<input type="submit" value="Add product">
</form>
</div>
<script>
window.onload = () => {
const url = window.location.href;
const params = new URLSearchParams(window.location.search);
let storeId = params.get('storeId');
let storeField = document.getElementById('astoreId');
storeField.value = storeId;
}
</script>
</body>
</html>