Fix inventory form.
This commit is contained in:
parent
4afddf3ee6
commit
8b665ca2b5
2 changed files with 2 additions and 4 deletions
|
|
@ -40,8 +40,6 @@ def _fields_for_model(model: str):
|
||||||
{"name": "location", "row": "status", "label": "Location", "wrap": {"class": "col"},
|
{"name": "location", "row": "status", "label": "Location", "wrap": {"class": "col"},
|
||||||
"attrs": {"class": "form-control"}, "label_attrs": {"class": "form-label"},
|
"attrs": {"class": "form-control"}, "label_attrs": {"class": "form-label"},
|
||||||
"label_spec": "{name} - {room_function.description}"},
|
"label_spec": "{name} - {room_function.description}"},
|
||||||
# {"name": "condition", "row": "status", "label": "Condition", "wrap": {"class": "col"},
|
|
||||||
# "attrs": {"class": "form-control"}, "label_attrs": {"class": "form-label"}},
|
|
||||||
{"name": "condition", "label": "Condition", "row": "status", "wrap": {"class": "col"},
|
{"name": "condition", "label": "Condition", "row": "status", "wrap": {"class": "col"},
|
||||||
"type": "select", "options": [
|
"type": "select", "options": [
|
||||||
{"label": "Deployed", "value": "Deployed"},
|
{"label": "Deployed", "value": "Deployed"},
|
||||||
|
|
@ -66,8 +64,8 @@ def _fields_for_model(model: str):
|
||||||
{"name": "names", "order": 20, "attrs": {"class": "row"}, "parent": "everything"},
|
{"name": "names", "order": 20, "attrs": {"class": "row"}, "parent": "everything"},
|
||||||
{"name": "device", "order": 30, "attrs": {"class": "row mt-2"}, "parent": "everything"},
|
{"name": "device", "order": 30, "attrs": {"class": "row mt-2"}, "parent": "everything"},
|
||||||
{"name": "status", "order": 40, "attrs": {"class": "row mt-2"}, "parent": "everything"},
|
{"name": "status", "order": 40, "attrs": {"class": "row mt-2"}, "parent": "everything"},
|
||||||
{"name": "notes", "order": 45, "attrs": {"class": "row mt-2"}, "parent": "everything"},
|
|
||||||
{"name": "image", "order": 50, "attrs": {"class": "col-4"}, "parent": "kitchen_sink"},
|
{"name": "image", "order": 50, "attrs": {"class": "col-4"}, "parent": "kitchen_sink"},
|
||||||
|
{"name": "notes", "order": 55, "attrs": {"class": "row mt-2"}},
|
||||||
]
|
]
|
||||||
|
|
||||||
elif model.lower() == 'user':
|
elif model.lower() == 'user':
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<label class="form-label">Notes</label>
|
<label class="form-label">Notes</label>
|
||||||
<div class="d-flex justify-content-between align-items-start">
|
<div class="d-flex justify-content-between align-items-start border rounded py-1 px-2">
|
||||||
<div class="me-3 w-100 markdown-body" id="editContainer"></div>
|
<div class="me-3 w-100 markdown-body" id="editContainer"></div>
|
||||||
<script type="application/json" id="noteContent">{{ (field['template_ctx']['values']['notes'] if field['template_ctx']['values']['notes'] else '') | tojson }}</script>
|
<script type="application/json" id="noteContent">{{ (field['template_ctx']['values']['notes'] if field['template_ctx']['values']['notes'] else '') | tojson }}</script>
|
||||||
<div class="form-check form-switch">
|
<div class="form-check form-switch">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue