Skip to content

Commit

Permalink
Fix minor incompatible changes in macro files (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
tchapi authored Dec 16, 2021
1 parent 821ebd2 commit 7e17244
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Resources/views/macros_bootstrap_4.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Example:
{% for translationsFields in form %}
{% set locale = translationsFields.vars.name %}

<li{% if app.request.locale == locale %} class="active"{% endif %}>
<a href="#{{ translationsFields.vars.id }}_{{ fieldsNames|join('_') }}_a2lix_translations-fields" data-toggle="tab" role="tab">
<li class="nav-item">
<a href="#{{ translationsFields.vars.id }}_{{ fieldsNames|join('_') }}_a2lix_translations-fields" class="nav-link {% if app.request.locale == locale %}active{% endif %}" data-toggle="tab" role="tab">
{{ translationsFields.vars.label|default(locale|humanize)|trans }}
{% if form.vars.default_locale == locale %}{{ '[Default]'|trans }}{% endif %}
{% if translationsFields.vars.required %}*{% endif %}
Expand All @@ -27,7 +27,7 @@ Example:
{% for translationsFields in form %}
{% set locale = translationsFields.vars.name %}

<div id="{{ translationsFields.vars.id }}_{{ fieldsNames|join('_') }}_a2lix_translations-fields" class="tab-pane {% if app.request.locale == locale %}active{% endif %} {% if not form.vars.valid %}sonata-ba-field-error{% endif %}" role="tabpanel">
<div id="{{ translationsFields.vars.id }}_{{ fieldsNames|join('_') }}_a2lix_translations-fields" class="tab-pane {% if app.request.locale == locale %}show active{% endif %} {% if not form.vars.valid %}sonata-ba-field-error{% endif %}" role="tabpanel">
{% for translationsField in translationsFields|filter(translationsField => translationsField.vars.name in fieldsNames) %}
{{ form_row(translationsField) }}
{% endfor %}
Expand Down
6 changes: 3 additions & 3 deletions src/Resources/views/macros_bootstrap_5.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Example:
{% for translationsFields in form %}
{% set locale = translationsFields.vars.name %}

<li{% if app.request.locale == locale %} class="active"{% endif %}>
<a href="#{{ translationsFields.vars.id }}_{{ fieldsNames|join('_') }}_a2lix_translations-fields" data-toggle="tab" role="tab">
<li class="nav-item">
<a href="#{{ translationsFields.vars.id }}_{{ fieldsNames|join('_') }}_a2lix_translations-fields" class="nav-link {% if app.request.locale == locale %}active{% endif %}" data-bs-toggle="tab" role="tab">
{{ translationsFields.vars.label|default(locale|humanize)|trans }}
{% if form.vars.default_locale == locale %}{{ '[Default]'|trans }}{% endif %}
{% if translationsFields.vars.required %}*{% endif %}
Expand All @@ -27,7 +27,7 @@ Example:
{% for translationsFields in form %}
{% set locale = translationsFields.vars.name %}

<div id="{{ translationsFields.vars.id }}_{{ fieldsNames|join('_') }}_a2lix_translations-fields" class="tab-pane {% if app.request.locale == locale %}active{% endif %} {% if not form.vars.valid %}sonata-ba-field-error{% endif %}" role="tabpanel">
<div id="{{ translationsFields.vars.id }}_{{ fieldsNames|join('_') }}_a2lix_translations-fields" class="tab-pane {% if app.request.locale == locale %}show active{% endif %} {% if not form.vars.valid %}sonata-ba-field-error{% endif %}" role="tabpanel">
{% for translationsField in translationsFields|filter(translationsField => translationsField.vars.name in fieldsNames) %}
{{ form_row(translationsField) }}
{% endfor %}
Expand Down

0 comments on commit 7e17244

Please sign in to comment.