Create select widget based on tomselect on django backend

Replace make_ajax in elections by the new widget
This commit is contained in:
klmp200 committed 2024-10-19 21:32:58 +02:00
1 parent 0a0092e189
commit 8be8328830
5 files changed
+103 -60

No files matched your search

@@ -0,0 +1,10 @@
<script-once src="{{ statics.js }}" defer></script-once>
{% for css in statics.csss %}
<link-once rel="stylesheet" type="text/css" href="{{ css }}" defer></link-once>
{% endfor %}
<autocomplete-select name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>{% for group_name, group_choices, group_index in widget.optgroups %}{% if group_name %}
<optgroup label="{{ group_name }}">{% endif %}{% for widget in group_choices %}
{% include widget.template_name %}{% endfor %}{% if group_name %}
</optgroup>{% endif %}{% endfor %}
</autocomplete-select>