Updating notes support done!

This commit is contained in:
Yaro Kasear 2025-10-02 15:42:00 -05:00
parent bcf14cf251
commit 53efc8551d
4 changed files with 129 additions and 16 deletions

View file

@ -48,7 +48,9 @@ def init_entry_routes(app):
"device_type", "owner", "location", "condition", "image", "notes"]
fields_spec = [
{"name": "label", "type": "display", "label": "", "row": "label",
"attrs": {"class": "display-6 mb-3"}},
"attrs": {"class": "display-6 mb-3"}, "wrap": {"class": "col"}},
{"name": "submit", "label": "", "row": "label", "type": "template", "template": "submit_button.html",
"wrap": {"class": "col-auto text-end me-2"}, "attrs": {"data-model": model}},
{"name": "name", "row": "names", "label": "Name", "wrap": {"class": "col-3"},
"attrs": {"class": "form-control"}, "label_attrs": {"class": "form-label"}},
{"name": "serial", "row": "names", "label": "Serial #", "wrap": {"class": "col"},
@ -72,12 +74,11 @@ def init_entry_routes(app):
{"name": "image", "label": "", "row": "image", "type": "template", "label_spec": "{filename}",
"template": "image_display.html", "attrs": {"class": "img-fluid img-thumbnail h-auto"},
"wrap": {"class": "h-100 w-100"}},
{"name": "notes", "type": "textarea", "label": "Notes", "row": "notes", "wrap": {"class": "col"},
"attrs": {"class": "form-control", "rows": 10, "style": "resize: none;"},
"label_attrs": {"class": "form-label"}},
{"name": "notes", "type": "template", "label": "Notes", "row": "notes", "wrap": {"class": "col"},
"template": "inventory_note.html"},
]
layout = [
{"name": "label", "order": 5},
{"name": "label", "order": 5, "attrs": {"class": "row align-items-center"}},
{"name": "kitchen_sink", "order": 6, "attrs": {"class": "row"}},
{"name": "everything", "order": 10, "attrs": {"class": "col"}, "parent": "kitchen_sink"},
{"name": "names", "order": 20, "attrs": {"class": "row"}, "parent": "everything"},