59 lines
1.8 KiB
HTML
59 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Update Item</title>
|
|
</head>
|
|
<style>
|
|
form { display: table; margin: 0 auto;}
|
|
form p { display: table-row; }
|
|
label { display: table-cell; }
|
|
input { display: table-cell; }
|
|
</style>
|
|
<body>
|
|
<div align="center">
|
|
<a href="/create">Add</a> |
|
|
<a href="/view">View</a>
|
|
</div>
|
|
|
|
<h2 align="center">Update Item</h2>
|
|
|
|
<form action='' method = "POST">
|
|
<p>
|
|
<label for="assettag">SKU:</label>
|
|
<input id="assettag" type = "text" name = "assettag" value="{{item.assettag}}" required/>
|
|
</p>
|
|
<p>
|
|
<label for="hostname">Name:</label>
|
|
<input id="hostname" type = "text" name = "hostname" value="{{item.hostname}}" required/>
|
|
</p>
|
|
<p>
|
|
<label for="warrantyfrom">Description:</label>
|
|
<input id="warrantyfrom" type = "text" name = "warrantyfrom" value="{{item.warrantyfrom}}" required/>
|
|
</p>
|
|
<p>
|
|
<label for="status">Price:</label>
|
|
<input id="status" type = "integer" name = "status" value="{{item.status}}" required/>
|
|
</p>
|
|
<p>
|
|
<label for="staffnum">Quantity:</label>
|
|
<input id="staffnum" type = "integer" name = "staffnum" value="{{item.staffnum}}" required/>
|
|
</p>
|
|
<p>
|
|
<input type = "submit" value = "Update" />
|
|
</p>
|
|
</form>
|
|
|
|
<p align="center">
|
|
{% if exc == 'integrity' %}
|
|
Item with such SKU already exists
|
|
{% endif %}
|
|
{% if exc == 'status' %}
|
|
Data input error. Price must have a numeric value
|
|
{% endif %}
|
|
{% if exc == 'staffnum' %}
|
|
Data input error. Staff number must be an integer
|
|
{% endif %}
|
|
</p>
|
|
</body>
|
|
</html> |