remove spaces from autocomplete selects

This commit is contained in:
imperosol
2025-09-29 17:43:50 +02:00
parent 543a424258
commit 40c3276c3c
2 changed files with 27 additions and 25 deletions

View File

@@ -1,12 +1,13 @@
{% for js in statics.js %}
{% spaceless %}
{% for js in statics.js %}
<script-once type="module" src="{{ js }}"></script-once>
{% endfor %}
{% for css in statics.css %}
{% endfor %}
{% for css in statics.css %}
<link-once rel="stylesheet" type="text/css" href="{{ css }}" defer></link-once>
{% endfor %}
{% endfor %}
<{{ component }} name="{{ widget.name }}" {% include "django/forms/widgets/attrs.html" %}>
{% for group_name, group_choices, group_index in widget.optgroups %}
<{{ component }} 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 %}
@@ -16,8 +17,9 @@
{% if group_name %}
</optgroup>
{% endif %}
{% endfor %}
{% if initial %}
{% endfor %}
{% if initial %}
<slot style="display:none" name="initial">{{ initial }}</slot>
{% endif %}
</{{ component }}>
{% endif %}
</{{ component }}>
{% endspaceless %}

View File

@@ -67,13 +67,13 @@
<option value="FIN">{% trans %}Confirm (FIN){% endtrans %}</option>
<option value="ANN">{% trans %}Cancel (ANN){% endtrans %}</option>
</optgroup>
{% for category in categories.keys() %}
{%- for category in categories.keys() -%}
<optgroup label="{{ category }}">
{% for product in categories[category] %}
{%- for product in categories[category] -%}
<option value="{{ product.id }}">{{ product }}</option>
{% endfor %}
{%- endfor -%}
</optgroup>
{% endfor %}
{%- endfor -%}
</counter-product-select>
<input type="submit" value="{% trans %}Go{% endtrans %}"/>