Skip to content

Commit

Permalink
Added form tag group id and class to resource-form-widget tags
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoJokhan committed Jun 6, 2023
1 parent 45acb4d commit 9602aa1
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
and data.groupedOpenstadTags[field.tagType]
and data.groupedOpenstadTags[field.tagType].length %}

<div id="resource-form-tag-group-{{field.tagType}}" class="form-tag-group">
{% for tag in data.groupedOpenstadTags[field.tagType] %}

<div class="checkbox">
<input
type="checkbox"
Expand All @@ -14,8 +16,10 @@
{% if field.idea.tags %}checked{% endif %}
/>
<label for="checkbox-{{loop.index}}-{{tag.id}}" class="checkbox-label">{{tag.name}}</label>
</div>
</div>
{% endfor %}
</div>

{% endif %}
</div>

Expand All @@ -25,16 +29,18 @@
{% set outer_loop = loop %}

{% if field.showTagTypeLabels %}
{% if outer_loop.length > 1 and key !== 'undefined' %}
{% if outer_loop.length > 1 and key !== 'undefined' and key !== 'null'%}
<p>{{key}}</p>
{% endif %}

{% if outer_loop.length > 1 and key == 'undefined' %}
{% if outer_loop.length > 1 and key == 'undefined' or key == 'null' %}
<p>Overig</p>
{% endif %}
{% endif %}

{% for tag in tagList %}
<div id="resource-form-tag-group-{{key if key !=='undefined' and key !== 'null' else 'overig'}}" class="form-tag-group">

{% for tag in tagList %}
<div class="checkbox">
<input
type="checkbox"
Expand All @@ -47,6 +53,8 @@
<label for="checkbox-{{outer_loop.index}}-{{loop.index}}-{{tag.id}}" class="checkbox-label">{{tag.name}}</label>
</div>
{% endfor %}
</div>

{% endfor %}
{% endif %}
</div>

1 comment on commit 9602aa1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Published new image: openstad/frontend:feature-prefix-tag-container-with-unique-id-9602aa1

Please sign in to comment.