diff --git a/inventory/routes/entry.py b/inventory/routes/entry.py index aa8bad4..94b1890 100644 --- a/inventory/routes/entry.py +++ b/inventory/routes/entry.py @@ -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"}, diff --git a/inventory/templates/inventory_note.html b/inventory/templates/inventory_note.html new file mode 100644 index 0000000..22dab40 --- /dev/null +++ b/inventory/templates/inventory_note.html @@ -0,0 +1,108 @@ + +