mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 17:55:03 +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
|
@ -129,9 +129,9 @@
|
|||
|
||||
<div class="form-row mt-2">
|
||||
<div class="offset-2 col">
|
||||
<div class="form-check abc-checkbox">
|
||||
<input class="form-check-input" name="include_children" id="include_children" type="checkbox" checked>
|
||||
<label class="form-check-label" for="include_children">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input class="form-check-input custom-control-input" name="include_children" id="include_children" type="checkbox" checked>
|
||||
<label class="form-check-label custom-control-label" for="include_children">
|
||||
{% trans %}export.include_children{% endtrans %}
|
||||
</label>
|
||||
</div>
|
||||
|
@ -182,9 +182,9 @@
|
|||
|
||||
<div class="form-row mt-2">
|
||||
<div class="offset-2 col">
|
||||
<div class="form-check abc-checkbox">
|
||||
<input class="form-check-input" name="include_children" id="include_children" type="checkbox" checked>
|
||||
<label class="form-check-label" for="include_children">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input class="form-check-input custom-control-input" name="include_children" id="include_children" type="checkbox" checked>
|
||||
<label class="form-check-label custom-control-label" for="include_children">
|
||||
{% trans %}export.include_children{% endtrans %}
|
||||
</label>
|
||||
</div>
|
||||
|
|
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