Starting to add new combobox.
This commit is contained in:
parent
e149a8d117
commit
c9b41b05b2
2 changed files with 9 additions and 4 deletions
|
|
@ -73,7 +73,9 @@ create_url = none, edit_url = none, delete_url = none, refresh_url = none
|
||||||
{% for option in options if options %}
|
{% for option in options if options %}
|
||||||
<option value="{{ option.id }}">{{ option.name }}</option>
|
<option value="{{ option.id }}">{{ option.name }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% if not options and refresh_url %}
|
||||||
<option disabled>Loading...</option>
|
<option disabled>Loading...</option>
|
||||||
|
{% endif %}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
{% if refresh_url %}
|
{% if refresh_url %}
|
||||||
|
|
@ -83,4 +85,4 @@ create_url = none, edit_url = none, delete_url = none, refresh_url = none
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}}
|
||||||
|
|
@ -128,11 +128,14 @@
|
||||||
<div class="tab-pane fade show active border border-top-0 p-3" id="inventory-tab-pane">
|
<div class="tab-pane fade show active border border-top-0 p-3" id="inventory-tab-pane">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
{{ combos.render_combobox(
|
{{ combos.dynamic_combobox(
|
||||||
id='brand',
|
id='brand',
|
||||||
options=brands,
|
|
||||||
label='Brands',
|
label='Brands',
|
||||||
placeholder='Add a new brand'
|
placeholder='Add a new brand',
|
||||||
|
create_url=url_for('ui.create_item', model_name='brand'),
|
||||||
|
edit_url=url_for('ui.update_item', model_name='brand'),
|
||||||
|
refresh_url=url_for('ui.list_items', model_name='brand'),
|
||||||
|
delete_url=url_for('ui.delete_item', model_name='brand')
|
||||||
) }}
|
) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue