Skip to content

Commit

Permalink
fix: tabs special characters (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasvinclav authored May 30, 2024
1 parent 2f7e421 commit ee4b333
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/unfold/templates/unfold/helpers/fieldsets_tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
{% for fieldset in tabs %}
<li>
<a class="cursor-pointer font-semibold hover:text-gray-700 dark:hover:text-white"
x-on:click="openTab = '{{ fieldset.name|slugify }}'"
x-bind:class="openTab == '{{ fieldset.name|slugify }}'{% if forloop.first %} || openTab == null{% endif %} ? 'text-gray-700 dark:text-white' : ''">
x-on:click="openTab = '{{ forloop.counter0 }}-{{ fieldset.name|slugify }}'"
x-bind:class="openTab == '{{ forloop.counter0 }}-{{ fieldset.name|slugify }}'{% if forloop.first %} || openTab == null{% endif %} ? 'text-gray-700 dark:text-white' : ''">
{{ fieldset.name }}
</a>
</li>
{% endfor %}
</ul>

{% for fieldset in tabs %}
<div class="tab-wrapper{% if fieldset.name %} fieldset-{{ fieldset.name|slugify }}{% endif %}"
x-show="openTab == '{{ fieldset.name|slugify }}'{% if forloop.first %} || openTab == null{% endif %}">
<div class="tab-wrapper{% if fieldset.name %} fieldset-{{ fieldset.name|slugify }} fieldset-{{ forloop.counter0 }}-{{ fieldset.name|slugify }}{% endif %}"
x-show="openTab == '{{ forloop.counter0 }}-{{ fieldset.name|slugify }}'{% if forloop.first %} || openTab == null{% endif %}">
{% include 'admin/includes/fieldset.html' %}
</div>
{% endfor %}
Expand Down

0 comments on commit ee4b333

Please sign in to comment.