mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Create select widget based on tomselect on django backend
Replace make_ajax in elections by the new widget
This commit is contained in:
10
core/templates/core/widgets/autocomplete_select.jinja
Normal file
10
core/templates/core/widgets/autocomplete_select.jinja
Normal file
@ -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>
|
Reference in New Issue
Block a user