mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 09:44:41 +02:00
Improved checkboxes and file input on import dialog.
This commit is contained in:
parent
68aa750e00
commit
fbfb0269d3
9 changed files with 72 additions and 16 deletions
29
templates/Form/extendedBootstrap4_layout.html.twig
Normal file
29
templates/Form/extendedBootstrap4_layout.html.twig
Normal file
|
@ -0,0 +1,29 @@
|
|||
{% extends 'bootstrap_4_horizontal_layout.html.twig' %}
|
||||
|
||||
{% block file_widget -%}
|
||||
{%- set type = type|default('file') -%}
|
||||
{{- block('form_widget_simple') -}}
|
||||
{% endblock %}
|
||||
|
||||
{% block checkbox_widget %}
|
||||
{# {% set parent_label_class=(parent_label_class|default(label_attr.class|default(''))) ~ ' checkbox-custom' %} #}
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
|
||||
{#
|
||||
{% block checkbox_widget -%}
|
||||
{%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
|
||||
{%- if 'checkbox-custom' in parent_label_class -%}
|
||||
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' custom-control-input')|trim}) -%}
|
||||
<div class="custom-control custom-checkbox{{ 'checkbox-inline' in parent_label_class ? ' custom-control-inline' }}">
|
||||
{{- form_label(form, null, { widget: parent() }) -}}
|
||||
</div>
|
||||
{%- else -%}
|
||||
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-check-input')|trim}) -%}
|
||||
<div class="form-check abc-checkbox {{ 'checkbox-inline' in parent_label_class ? ' form-check-inline' }}">
|
||||
{{- form_label(form, null, { widget: parent() }) -}}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
{%- endblock checkbox_widget %}
|
||||
#}
|
Loading…
Add table
Add a link
Reference in a new issue