Enhance settings page; add room management functionality with combo box integration and update rendering logic for improved usability
This commit is contained in:
parent
ad413c3f1b
commit
ec08dd8ef1
4 changed files with 56 additions and 13 deletions
|
@ -1,6 +1,6 @@
|
|||
{% import "fragments/_icon_fragment.html" as icons %}
|
||||
|
||||
{% macro render_combobox(id, options, label=none, placeholder=none) %}
|
||||
{% macro render_combobox(id, options, label=none, placeholder=none, onAdd=none, onRemove=none, onEdit=none) %}
|
||||
{% if label %}
|
||||
<label for="{{ id }}-input" class="form-label">{{ label }}</label>
|
||||
{% endif %}
|
||||
|
@ -23,7 +23,11 @@
|
|||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
ComboBoxWidget.initComboBox("{{ id }}");
|
||||
ComboBoxWidget.initComboBox("{{ id }}", {
|
||||
{% if onAdd %}onAdd: {{ onAdd }},{% endif %}
|
||||
{% if onRemove %}onRemove: {{ onRemove }},{% endif %}
|
||||
{% if onEdit %}onEdit: {{ onEdit }}{% endif %}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endmacro %}
|
||||
{% endmacro %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue