Improving form.
This commit is contained in:
parent
21a3399ecd
commit
4afddf3ee6
2 changed files with 20 additions and 3 deletions
|
|
@ -40,8 +40,19 @@ 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"},
|
# {"name": "condition", "row": "status", "label": "Condition", "wrap": {"class": "col"},
|
||||||
"attrs": {"class": "form-control"}, "label_attrs": {"class": "form-label"}},
|
# "attrs": {"class": "form-control"}, "label_attrs": {"class": "form-label"}},
|
||||||
|
{"name": "condition", "label": "Condition", "row": "status", "wrap": {"class": "col"},
|
||||||
|
"type": "select", "options": [
|
||||||
|
{"label": "Deployed", "value": "Deployed"},
|
||||||
|
{"label": "Working", "value": "Working"},
|
||||||
|
{"label": "Unverified", "value": "Unverified"},
|
||||||
|
{"label": "Partially Inoperable", "value": "Partially Inoperable"},
|
||||||
|
{"label": "Inoperable", "value": "Inoperable"},
|
||||||
|
{"label": "Removed", "value": "Removed"},
|
||||||
|
{"label": "Disposed", "value": "Disposed"},
|
||||||
|
],
|
||||||
|
"label_attrs": {"class": "form-label"}, "attrs": {"class": "form-control"}},
|
||||||
{"name": "image", "label": "", "row": "image", "type": "template", "label_spec": "{filename}",
|
{"name": "image", "label": "", "row": "image", "type": "template", "label_spec": "{filename}",
|
||||||
"template": "image_display.html", "attrs": {"class": "img-fluid img-thumbnail h-auto"},
|
"template": "image_display.html", "attrs": {"class": "img-fluid img-thumbnail h-auto"},
|
||||||
"wrap": {"class": "h-100 w-100"}},
|
"wrap": {"class": "h-100 w-100"}},
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,13 @@ Inventory Manager - {{ model|title }} Listing
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<h1 class="display-4 text-center mt-5">{{ model|title }} Listing</h1>
|
<div class="container-fluid">
|
||||||
|
<h1 class="display-4 text-center mt-5">{{ model|title }} Listing</h1>
|
||||||
|
<div class="btn-group">
|
||||||
|
<button type="button" class="btn btn-primary mb-3" onclick="location.href='{{ url_for('entry.entry_new', model=model) }}'">New</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{ table | safe }}
|
{{ table | safe }}
|
||||||
|
|
||||||
<div class="d-flex justify-content-evenly mx-5">
|
<div class="d-flex justify-content-evenly mx-5">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue