mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-23 04:14:36 +02:00
Fixed bootstrap-selectpickers on bootstrap 5
This commit is contained in:
parent
5d6f244e71
commit
489f4b939a
5 changed files with 24 additions and 24 deletions
|
@ -115,3 +115,14 @@
|
|||
{%- endif -%}
|
||||
{%- endblock tristate_widget %}
|
||||
|
||||
{%- block choice_widget_collapsed -%}
|
||||
{# Only add the BS5 form-select class if we dont use bootstrap-selectpicker #}
|
||||
{% if attr["data-controller"] is defined and attr["data-controller"] != "elements--selectpicker" %}
|
||||
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-select')|trim}) -%}
|
||||
{% else %}
|
||||
{# If it is an selectpicker add form-control class to fill whole width #}
|
||||
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%}
|
||||
{% endif %}
|
||||
|
||||
{{- block("choice_widget_collapsed", "bootstrap_base_layout.html.twig") -}}
|
||||
{%- endblock choice_widget_collapsed -%}
|
Loading…
Add table
Add a link
Reference in a new issue