Working on better inventory entry form.
This commit is contained in:
parent
8b665ca2b5
commit
7935b5b57d
2 changed files with 3 additions and 2 deletions
|
|
@ -16,7 +16,8 @@ def _fields_for_model(model: str):
|
||||||
|
|
||||||
if model == "inventory":
|
if model == "inventory":
|
||||||
fields = ["label", "name", "serial", "barcode", "brand", "model",
|
fields = ["label", "name", "serial", "barcode", "brand", "model",
|
||||||
"device_type", "owner", "location", "condition", "image", "notes"]
|
"device_type", "owner", "location", "condition", "image",
|
||||||
|
"notes", "work_logs"]
|
||||||
fields_spec = [
|
fields_spec = [
|
||||||
{"name": "label", "type": "display", "label": "", "row": "label",
|
{"name": "label", "type": "display", "label": "", "row": "label",
|
||||||
"attrs": {"class": "display-6 mb-3"}, "wrap": {"class": "col"}},
|
"attrs": {"class": "display-6 mb-3"}, "wrap": {"class": "col"}},
|
||||||
|
|
@ -102,7 +103,6 @@ def _fields_for_model(model: str):
|
||||||
]
|
]
|
||||||
|
|
||||||
elif model == "worklog":
|
elif model == "worklog":
|
||||||
# tell the service to eager-load precisely what the template needs
|
|
||||||
fields = [
|
fields = [
|
||||||
"id",
|
"id",
|
||||||
"contact.label",
|
"contact.label",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
|
|
||||||
<div class="container mt-5">
|
<div class="container mt-5">
|
||||||
{{ form | safe }}
|
{{ form | safe }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue