diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index 95ae4f3b..860cef42 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -18,6 +18,11 @@ twig: saml_enabled: '%partdb.saml.enabled%' part_preview_generator: '@App\Services\Attachments\PartPreviewGenerator' + # Bootstrap grid classes used for horizontal form layouts + col_label: 'col-sm-3 col-lg-2' # The column classes for form labels + col_input: 'col-sm-9 col-lg-10' # The column classes for form input fields + offset_label: 'offset-sm-3 offset-lg-2' # Offset classes for elements that should be aligned with the input fields (e.g., submit buttons) + when@test: twig: strict_variables: true diff --git a/templates/admin/_delete_form.html.twig b/templates/admin/_delete_form.html.twig index fd653256..5a1d5a1a 100644 --- a/templates/admin/_delete_form.html.twig +++ b/templates/admin/_delete_form.html.twig @@ -5,7 +5,7 @@
-
+
{% set delete_disabled = (not is_granted("delete", entity)) or (entity.group is defined and entity.id == 1) or entity == app.user %}
@@ -20,7 +20,7 @@
{% if entity.parent is defined %} -
+
diff --git a/templates/admin/_duplicate.html.twig b/templates/admin/_duplicate.html.twig index 1b18cd71..cf6e8cca 100644 --- a/templates/admin/_duplicate.html.twig +++ b/templates/admin/_duplicate.html.twig @@ -1,5 +1,5 @@
- \ No newline at end of file +
diff --git a/templates/admin/_export_form.html.twig b/templates/admin/_export_form.html.twig index 07b00d43..7ef2e269 100644 --- a/templates/admin/_export_form.html.twig +++ b/templates/admin/_export_form.html.twig @@ -35,8 +35,8 @@
-
+
- \ No newline at end of file + diff --git a/templates/admin/base_admin.html.twig b/templates/admin/base_admin.html.twig index f710981d..f19f4c44 100644 --- a/templates/admin/base_admin.html.twig +++ b/templates/admin/base_admin.html.twig @@ -129,7 +129,7 @@
-
+
{{ form_widget(form.save) }}
diff --git a/templates/form/collection_types_layout.html.twig b/templates/form/collection_types_layout.html.twig index 96b71bf0..818f0a0f 100644 --- a/templates/form/collection_types_layout.html.twig +++ b/templates/form/collection_types_layout.html.twig @@ -63,8 +63,8 @@
{{ form_row(form.mountnames) }}
- -
+ +
{{ form_widget(form.price) }} {{ form_widget(form.priceCurrency) }} diff --git a/templates/form/extended_bootstrap_layout.html.twig b/templates/form/extended_bootstrap_layout.html.twig index 1227750c..01d30815 100644 --- a/templates/form/extended_bootstrap_layout.html.twig +++ b/templates/form/extended_bootstrap_layout.html.twig @@ -17,11 +17,11 @@ {% block form_label_class -%} - col-sm-3 + {{ col_label }} {%- endblock form_label_class %} {% block form_group_class -%} - col-sm-9 + {{ col_input }} {%- endblock form_group_class %} {% block si_unit_widget %} diff --git a/templates/info_providers/from_url/from_url.html.twig b/templates/info_providers/from_url/from_url.html.twig index 5aad1a03..3370a94c 100644 --- a/templates/info_providers/from_url/from_url.html.twig +++ b/templates/info_providers/from_url/from_url.html.twig @@ -12,7 +12,7 @@ {% endblock %} {% block card_content %} -

{% trans %}info_providers.from_url.help{% endtrans %}

+

{% trans %}info_providers.from_url.help{% endtrans %}

{{ form_start(form) }} {{ form_row(form.url) }} diff --git a/templates/info_providers/search/part_search.html.twig b/templates/info_providers/search/part_search.html.twig index a5602618..eac3507d 100644 --- a/templates/info_providers/search/part_search.html.twig +++ b/templates/info_providers/search/part_search.html.twig @@ -28,7 +28,7 @@ {{ form_row(form.providers) }}
- diff --git a/templates/info_providers/settings/provider_settings.html.twig b/templates/info_providers/settings/provider_settings.html.twig index 86e5bc9b..db942f8a 100644 --- a/templates/info_providers/settings/provider_settings.html.twig +++ b/templates/info_providers/settings/provider_settings.html.twig @@ -8,7 +8,7 @@ {% block card_title %} {% trans %}info_providers.settings.title{% endtrans %}: {{ info_provider_info.name }}{% endblock %} {% block card_content %} -
+

{% if info_provider_info.url is defined %} {{ info_provider_info.name }} @@ -23,7 +23,7 @@ {{ form_start(form) }}
-
+
{{ form_help(form) }}
diff --git a/templates/label_system/dialog.html.twig b/templates/label_system/dialog.html.twig index 11877a4c..532a4b63 100644 --- a/templates/label_system/dialog.html.twig +++ b/templates/label_system/dialog.html.twig @@ -36,7 +36,7 @@ {{ form_row(form.options.supported_element) }}
{{ form_label(form.options.width) }} -
+
{{ form_widget(form.options.width) }} @@ -59,8 +59,8 @@
- -
+ +
{{ profile.name ?? '-' }} {% if profile and is_granted("edit", profile) %}
-
+
diff --git a/templates/parts/edit/_eda.html.twig b/templates/parts/edit/_eda.html.twig index 1383871e..12299add 100644 --- a/templates/parts/edit/_eda.html.twig +++ b/templates/parts/edit/_eda.html.twig @@ -4,7 +4,7 @@ {{ form_row(form.eda_info.visibility) }}
-
+
{{ form_widget(form.eda_info.exclude_from_bom) }} {{ form_widget(form.eda_info.exclude_from_board) }} {{ form_widget(form.eda_info.exclude_from_sim) }} @@ -12,7 +12,7 @@
-
+
{% trans %}eda_info.kicad_section.title{% endtrans %}:
diff --git a/templates/parts/edit/_main.html.twig b/templates/parts/edit/_main.html.twig index f153d878..06c71106 100644 --- a/templates/parts/edit/_main.html.twig +++ b/templates/parts/edit/_main.html.twig @@ -1,7 +1,7 @@ {{ form_row(form.name) }} {% if part.category is not null and part.category.partnameHint is not empty %}
-
+

{% trans %}part.edit.name.category_hint{% endtrans %}: {{ part.category.partnameHint }}

diff --git a/templates/parts/edit/edit_form_styles.html.twig b/templates/parts/edit/edit_form_styles.html.twig index 9e989c92..44c8d89c 100644 --- a/templates/parts/edit/edit_form_styles.html.twig +++ b/templates/parts/edit/edit_form_styles.html.twig @@ -107,7 +107,7 @@ {% set id = 'collapse_' ~ random() %} -
@@ -142,7 +142,7 @@
{{ form_label(form.file) }} -
+
{{ form_widget(form.file) }} {{ form_errors(form.file) }} {% trans %}attachment.max_file_size{% endtrans %}: {{ max_upload_size | format_bytes }} diff --git a/templates/parts/edit/edit_part_info.html.twig b/templates/parts/edit/edit_part_info.html.twig index 28a88132..5b6d288a 100644 --- a/templates/parts/edit/edit_part_info.html.twig +++ b/templates/parts/edit/edit_part_info.html.twig @@ -140,7 +140,7 @@
-
+
{{ form_widget(form.save) }}
diff --git a/templates/security/2fa_base_form.html.twig b/templates/security/2fa_base_form.html.twig index 847048e4..e6ec99bb 100644 --- a/templates/security/2fa_base_form.html.twig +++ b/templates/security/2fa_base_form.html.twig @@ -33,7 +33,7 @@ {% if displayTrustedOption %}
-
+
@@ -48,11 +48,11 @@ {% block submit_btn %}
-
+
{% trans %}user.logout{% endtrans %}
{% endblock %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/templates/security/login.html.twig b/templates/security/login.html.twig index c09b3669..278f860b 100644 --- a/templates/security/login.html.twig +++ b/templates/security/login.html.twig @@ -22,7 +22,7 @@ {% block card_content %} {% if saml_enabled %} -
+
{% trans %}login.sso_saml_login{% endtrans %}

{% trans %}login.local_login_hint{% endtrans %}

@@ -39,6 +39,6 @@ {{ form_end(form) }} {% if allow_email_pw_reset %} - {% trans %}pw_reset.password_forget{% endtrans %} + {% trans %}pw_reset.password_forget{% endtrans %} {% endif %} {% endblock %} diff --git a/templates/settings/settings.html.twig b/templates/settings/settings.html.twig index 96e0f209..a2c01085 100644 --- a/templates/settings/settings.html.twig +++ b/templates/settings/settings.html.twig @@ -38,12 +38,12 @@ {% if section_widget.vars.embedded_settings_metadata is defined %} {# Check if we have nested embedded settings or not #}
- + {{ (section_widget.vars.label ?? section_widget.vars.name|humanize)|trans }}
-
+
{{ form_help(section_widget) }} {{ form_errors(section_widget) }}
diff --git a/templates/users/_2fa_settings.html.twig b/templates/users/_2fa_settings.html.twig index 80392c17..da0e61ff 100644 --- a/templates/users/_2fa_settings.html.twig +++ b/templates/users/_2fa_settings.html.twig @@ -37,11 +37,11 @@ {{ form_start(google_form, { 'attr': google_form_attr}) }} {% if not tfa_google.enabled %} -
+
{% trans %}tfa_google.disabled_message{% endtrans %}
-
+
{{ tfa_google.qrContent }}
@@ -55,7 +55,7 @@
-
+
@@ -72,7 +72,7 @@ {{ form_row(google_form.google_confirmation) }} {% else %} -
+
{% trans %}tfa_google.enabled_message{% endtrans %}
{% endif %} @@ -81,7 +81,7 @@
{% if user.backupCodes is empty %} -
+
{% trans %}tfa_backup.disabled{% endtrans %}
{% trans %}tfa_backup.explanation{% endtrans %}
@@ -89,19 +89,19 @@ {% set backup_form_attr = { 'data-delete-form': true, 'data-controller': 'elements--delete-btn', 'data-action': 'submit->elements--delete-btn#submit', 'data-delete-title': 'tfa_backup.reset_codes.confirm_title' | trans, 'data-delete-message': 'tfa_backup.reset_codes.confirm_message' | trans} %} {{ form_start(backup_form, { 'attr': backup_form_attr}) }} -
+
{% trans %}tfa_backup.enabled{% endtrans %}
{% trans %}tfa_backup.explanation{% endtrans %}
-
+

{% trans %}tfa_backup.remaining_tokens{% endtrans %}: {{ user.backupCodes | length }}

{% trans %}tfa_backup.generation_date{% endtrans %}: {{ user.backupCodesGenerationDate | format_datetime }}

-
+ -
+
{{ form_widget(backup_form.reset_codes) }}
{{ form_end(backup_form) }} diff --git a/templates/users/user_settings.html.twig b/templates/users/user_settings.html.twig index 0f218a1b..36cde643 100644 --- a/templates/users/user_settings.html.twig +++ b/templates/users/user_settings.html.twig @@ -28,7 +28,7 @@ {{ form_row(settings_form.showEmailOnProfile) }} {{ form_row(settings_form.avatar_file) }}
-
+
{% if user.masterPictureAttachment %} avatar {% endif %}