2025-01-29 05:27:19 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>Update Item</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h2 align="center">Update Item</h2>
|
|
|
|
|
|
|
|
<form action='' method = "POST">
|
|
|
|
<p>
|
2025-01-29 10:38:32 +00:00
|
|
|
<label for="assettag">Asset Tag:</label>
|
2025-01-29 10:05:36 +00:00
|
|
|
<input id="assettag" type = "text" name = "assettag" value="{{item.assettag}}" required/>
|
2025-01-29 05:27:19 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2025-01-29 10:38:32 +00:00
|
|
|
<label for="hostname">Host Name:</label>
|
2025-01-29 10:05:36 +00:00
|
|
|
<input id="hostname" type = "text" name = "hostname" value="{{item.hostname}}" required/>
|
2025-01-29 05:27:19 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2025-01-29 10:38:32 +00:00
|
|
|
<label for="warrantyfrom">Warranty From:</label>
|
2025-02-04 19:40:56 +00:00
|
|
|
<input id="warrantyfrom" type = "date" name = "warrantyfrom" value="{{item.warrantyfrom}}" required/>
|
2025-01-29 05:27:19 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2025-01-29 10:38:32 +00:00
|
|
|
<label for="status">Status:</label>
|
2025-01-29 10:05:36 +00:00
|
|
|
<input id="status" type = "integer" name = "status" value="{{item.status}}" required/>
|
2025-01-29 05:27:19 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2025-01-29 10:38:32 +00:00
|
|
|
<label for="staffnum">Staff No:</label>
|
2025-01-29 10:05:36 +00:00
|
|
|
<input id="staffnum" type = "integer" name = "staffnum" value="{{item.staffnum}}" required/>
|
2025-01-29 05:27:19 +00:00
|
|
|
</p>
|
2025-02-06 10:06:46 +00:00
|
|
|
<p><input type = "submit" value = "Update" /></p>
|
2025-01-29 05:27:19 +00:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<p align="center">
|
2025-02-06 10:06:46 +00:00
|
|
|
{%- if exc == 'integrity' -%}
|
|
|
|
Item with the same assettag already exists
|
|
|
|
{%- endif -%}
|
|
|
|
{%- if exc == 'status' -%}
|
|
|
|
Data input error. Invalid status value
|
|
|
|
{%- endif -%}
|
|
|
|
{%- if exc == 'staffnum' -%}
|
2025-01-29 10:05:36 +00:00
|
|
|
Data input error. Staff number must be an integer
|
2025-02-06 10:06:46 +00:00
|
|
|
{%- endif -%}
|
2025-01-29 05:27:19 +00:00
|
|
|
</p>
|
|
|
|
</body>
|
|
|
|
</html>
|