mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-01 08:44:48 +02:00
Use bootstrap 5 checkboxes.
This commit is contained in:
parent
017170e2d6
commit
43b4c78553
21 changed files with 59 additions and 134 deletions
|
@ -20,8 +20,8 @@
|
|||
</div>
|
||||
{% if entity.parent is defined %}
|
||||
<div class="ms-2 custom-control custom-checkbox custom-control-inline">
|
||||
<input type="checkbox" class="custom-control-input" id="recursive" name="delete_recursive">
|
||||
<label class="custom-control-label" for="recursive">{% trans %}entity.delete.recursive{% endtrans %}</label>
|
||||
<input type="checkbox" class="form-check-input" id="recursive" name="delete_recursive">
|
||||
<label class="form-check-label" for="recursive">{% trans %}entity.delete.recursive{% endtrans %}</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
|
||||
<div class="form-row mt-2">
|
||||
<div class="offset-sm-3 col-sm">
|
||||
<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">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input form-check-input" name="include_children" id="include_children" type="checkbox" checked>
|
||||
<label class="form-check-label form-check-label" for="include_children">
|
||||
{% trans %}export.include_children{% endtrans %}
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
{% set is_parent_custom = parent_label_class is defined and ('checkbox-custom' in parent_label_class or 'radio-custom' in parent_label_class) %}
|
||||
{% set is_custom = label_attr.class is defined and ('checkbox-custom' in label_attr.class or 'radio-custom' in label_attr.class) %}
|
||||
{%- if is_parent_custom or is_custom -%}
|
||||
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' custom-control-label')|trim}) -%}
|
||||
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' form-check-label')|trim}) -%}
|
||||
{%- else %}
|
||||
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' form-check-label')|trim}) -%}
|
||||
{%- endif %}
|
||||
|
@ -103,7 +103,7 @@
|
|||
{% block tristate_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}) -%}
|
||||
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-check-input')|trim}) -%}
|
||||
<div class="custom-control custom-checkbox{{ 'checkbox-inline' in parent_label_class ? ' custom-control-inline' }}">
|
||||
{{- form_label(form, null, { widget: block('tr_parent') }) -}}
|
||||
</div>
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<td>
|
||||
{% if multi_checkbox %}
|
||||
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input tristate permission_multicheckbox" id="mulit_check_{{ form.vars.label }}">
|
||||
<label class="custom-control-label" for="mulit_check_{{ form.vars.label }}">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tristate permission_multicheckbox" id="mulit_check_{{ form.vars.label }}">
|
||||
<label class="form-check-label" for="mulit_check_{{ form.vars.label }}">
|
||||
<b>{{ form.vars.label | trans }}</b>
|
||||
</label>
|
||||
</div>
|
||||
|
@ -53,16 +53,16 @@
|
|||
<label><b>{% trans %}permission.legend.title{% endtrans %}:</b></label>
|
||||
<div>
|
||||
<div class="custom-control custom-control-inline custom-checkbox">
|
||||
<input type="checkbox" hidden class="custom-control-input">
|
||||
<label class="custom-control-label">{% trans %}permission.legend.disallow{% endtrans %}</label>
|
||||
<input type="checkbox" hidden class="form-check-input">
|
||||
<label class="form-check-label">{% trans %}permission.legend.disallow{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="custom-control custom-control-inline custom-checkbox">
|
||||
<input class="custom-control-input" type="checkbox" hidden checked>
|
||||
<label class="custom-control-label">{% trans %}permission.legend.allow{% endtrans %}</label>
|
||||
<input class="form-check-input" type="checkbox" hidden checked>
|
||||
<label class="form-check-label">{% trans %}permission.legend.allow{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="custom-control custom-control-inline custom-checkbox">
|
||||
<input type="checkbox" class="tristate custom-control-input" hidden indeterminate="indeterminate">
|
||||
<label class="custom-control-label">{% trans %}permission.legend.inherit{% endtrans %}</label>
|
||||
<input type="checkbox" class="tristate form-check-input" hidden indeterminate="indeterminate">
|
||||
<label class="form-check-label">{% trans %}permission.legend.inherit{% endtrans %}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -60,8 +60,8 @@
|
|||
<li role="separator" class="dropdown-divider" id="toggleDarkmodeSeparator" hidden></li>
|
||||
<div class="px-4 px-3" id="toggleDarkmodeContainer" hidden>
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="toggleDarkmode">
|
||||
<label class="custom-control-label"
|
||||
<input type="checkbox" class="form-check-input" id="toggleDarkmode">
|
||||
<label class="form-check-label"
|
||||
for="toggleDarkmode">{% trans %}ui.toggle_darkmode{% endtrans %}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,64 +1,64 @@
|
|||
<form action="{{ url('parts_search') }}" class="d-flex my-lg-0 ms-auto" method="get">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-light dropdown-toggle my-2" type="button" id="navbar-search-options" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-bs-auto-close="inside">
|
||||
<button class="btn btn-light dropdown-toggle my-2" type="button" id="navbar-search-options" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-bs-auto-close="false">
|
||||
{% trans %}search.options.label{% endtrans %}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="navbar-search-options">
|
||||
<div class="px-1 py-2">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="search_name" name="name" value="1" checked>
|
||||
<label for="search_name" class="custom-control-label justify-content-start">{% trans %}name.label{% endtrans %}</label>
|
||||
<div class="px-2">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="search_name" name="name" value="1" checked>
|
||||
<label for="search_name" class="form-check-label justify-content-start">{% trans %}name.label{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="search_category" name="category" value="1" checked>
|
||||
<label for="search_category" class="custom-control-label justify-content-start">{% trans %}category.label{% endtrans %}</label>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="search_category" name="category" value="1" checked>
|
||||
<label for="search_category" class="form-check-label justify-content-start">{% trans %}category.label{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="search_description" name="description" value="1" checked>
|
||||
<label for="search_description" class="custom-control-label justify-content-start">{% trans %}description.label{% endtrans %}</label>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="search_description" name="description" value="1" checked>
|
||||
<label for="search_description" class="form-check-label justify-content-start">{% trans %}description.label{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="search_tags" name="tags" value="1" checked>
|
||||
<label for="search_tags" class="custom-control-label justify-content-start">{% trans %}tags.label{% endtrans %}</label>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="search_tags" name="tags" value="1" checked>
|
||||
<label for="search_tags" class="form-check-label justify-content-start">{% trans %}tags.label{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="search_storelocation" name="storelocation" value="1" checked>
|
||||
<label for="search_storelocation" class="custom-control-label justify-content-start">{% trans %}storelocation.label{% endtrans %}</label>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="search_storelocation" name="storelocation" value="1" checked>
|
||||
<label for="search_storelocation" class="form-check-label justify-content-start">{% trans %}storelocation.label{% endtrans %}</label>
|
||||
</div>
|
||||
<div class=" custom-control custom-checkbox">
|
||||
<input type="checkbox" id="search_comment" class="custom-control-input" id="search_comment" name="comment" value="1" checked>
|
||||
<label for="search_comment" class="custom-control-label justify-content-start">{% trans %}comment.label{% endtrans %}</label>
|
||||
<input type="checkbox" id="search_comment" class="form-check-input" id="search_comment" name="comment" value="1" checked>
|
||||
<label for="search_comment" class="form-check-label justify-content-start">{% trans %}comment.label{% endtrans %}</label>
|
||||
</div>
|
||||
{% if true %}
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="search_supplierpartnr" name="ordernr" value="1" checked>
|
||||
<label for="search_supplierpartnr" class="custom-control-label justify-content-start">{% trans %}ordernumber.label.short{% endtrans %}</label>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="search_supplierpartnr" name="ordernr" value="1" checked>
|
||||
<label for="search_supplierpartnr" class="form-check-label justify-content-start">{% trans %}ordernumber.label.short{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="search_supplier" name="supplier" value="1">
|
||||
<label for="search_supplier" class="custom-control-label justify-content-start">{% trans %}supplier.label{% endtrans %}</label>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="search_supplier" name="supplier" value="1">
|
||||
<label for="search_supplier" class="form-check-label justify-content-start">{% trans %}supplier.label{% endtrans %}</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if true %}
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="search_manufacturer" name="manufacturer" value="1">
|
||||
<label for="search_manufacturer" class="custom-control-label justify-content-start">{% trans %}manufacturer.label{% endtrans %}</label>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="search_manufacturer" name="manufacturer" value="1">
|
||||
<label for="search_manufacturer" class="form-check-label justify-content-start">{% trans %}manufacturer.label{% endtrans %}</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if true %}
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="search_footprint" name="footprint" value="1">
|
||||
<label for="search_footprint" class="custom-control-label justify-content-start">{% trans %}footprint.label{% endtrans %}</label>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="search_footprint" name="footprint" value="1">
|
||||
<label for="search_footprint" class="form-check-label justify-content-start">{% trans %}footprint.label{% endtrans %}</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="disable_pid_input" name="disable_pid_input" value="1">
|
||||
<label for="disable_pid_input" class="custom-control-label justify-content-start">{% trans %}search.deactivateBarcode{% endtrans %}</label>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="disable_pid_input" name="disable_pid_input" value="1">
|
||||
<label for="disable_pid_input" class="form-check-label justify-content-start">{% trans %}search.deactivateBarcode{% endtrans %}</label>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="regex" name="regex" value="1">
|
||||
<label for="regex" class="custom-control-label justify-content-start">{% trans %}search.regexmatching{% endtrans %}</label>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="regex" name="regex" value="1">
|
||||
<label for="regex" class="form-check-label justify-content-start">{% trans %}search.regexmatching{% endtrans %}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
<div class="form-group row mt-3">
|
||||
<div class="offset-3">
|
||||
<div class="custom-checkbox custom-control ms-2">
|
||||
<input id="_trusted" class="custom-control-input" type="checkbox" name="{{ trustedParameterName }}" />
|
||||
<label class="custom-control-label" for="_trusted">{% trans %}tfa.code.trusted_pc{% endtrans %}</label>
|
||||
<input id="_trusted" class="form-check-input" type="checkbox" name="{{ trustedParameterName }}" />
|
||||
<label class="form-check-label" for="_trusted">{% trans %}tfa.code.trusted_pc{% endtrans %}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
<div class="form-group row">
|
||||
<div class="col-md-9 offset-md-3 col-lg-10 offset-lg-2">
|
||||
<div class="custom-control custom-checkbox custom-control-inline">
|
||||
<input class="custom-control-input" name="_remember_me" id="remember_me" type="checkbox">
|
||||
<label class="custom-control-label" for="remember_me">
|
||||
<input class="form-check-input" name="_remember_me" id="remember_me" type="checkbox">
|
||||
<label class="form-check-label" for="remember_me">
|
||||
{% trans %}login.rememberme{% endtrans %}
|
||||
</label>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue