@@ -85,7 +85,7 @@
// Check if all checkboxes are checked
const allChecked = Array.from(document.querySelectorAll('.form-check-input')).every(cb => cb.checked);
const allUnchecked = Array.from(document.querySelectorAll('.form-check-input')).every(cb => !cb.checked);
- if (allChecked && !window.__alreadyNavigated && {{ level }} < 28) {
+ if (allChecked && !window.__alreadyNavigated && {{ level }} < 51) {
window.__alreadyNavigated = true;
location.href = "{{ url_for('main.coffee', level=level + 1) }}";
} else if (allUnchecked && !window.__alreadyNavigated && {{ level }} > -2) {
diff --git a/inventory/templates/fragments/_combobox_fragment.html b/inventory/templates/fragments/_combobox_fragment.html
index c28dcca..e13c21e 100644
--- a/inventory/templates/fragments/_combobox_fragment.html
+++ b/inventory/templates/fragments/_combobox_fragment.html
@@ -42,3 +42,150 @@
});
{% endmacro %}
+
+{% macro dynamic_combobox(
+ id, options, label = none, placeholder = none, data_attributes = none,
+ create_url = none, edit_url = none, delete_url = none, refresh_url = none
+) %}
+ {% if label %}
+
+ {% endif %}
+
+
+
+{% endmacro %}
diff --git a/inventory/templates/layout.html b/inventory/templates/layout.html
index 92b867b..1a3ebb4 100644
--- a/inventory/templates/layout.html
+++ b/inventory/templates/layout.html
@@ -76,6 +76,8 @@
integrity="sha384-zqgMe4cx+N3TuuqXt4kWWDluM5g1CiRwqWBm3vpvY0GcDoXTwU8d17inavaLy3p3"
crossorigin="anonymous">
+
+
diff --git a/inventory/templates/playground.html b/inventory/templates/playground.html
new file mode 100644
index 0000000..af7322e
--- /dev/null
+++ b/inventory/templates/playground.html
@@ -0,0 +1,18 @@
+{% extends 'layout.html' %}
+
+{% block content %}
+ {{ combos.dynamic_combobox(
+ 'play',
+ [
+ {
+ 'id': 1,
+ 'name': 'Beans'
+ },
+ {
+ 'id': 2,
+ 'name': 'Toast'
+ },
+ ],
+ 'Breakfast!'
+ ) }}
+{% endblock %}
\ No newline at end of file