Skip to content

Commit

Permalink
feat: fix default email template
Browse files Browse the repository at this point in the history
  • Loading branch information
René Hrdina committed Apr 19, 2022
1 parent fbc3778 commit 52b9532
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bundle/Resources/views/email/default.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{# event \Netgen\Bundle\InformationCollectionBundle\Event\InformationCollected #}
{# content \eZ\Publish\API\Repository\Values\Content\Content #}
{# @var event \Netgen\InformationCollection\API\Value\Event\InformationCollected #}
{# @var content \eZ\Publish\API\Repository\Values\Content\Content #}
{# @var content_type \eZ\Publish\API\Repository\Values\ContentType\ContentType #}

{% block email %}

Expand All @@ -12,14 +13,14 @@
{{ ez_field_name(content, field_name) }}:
</div>
<div class="value">
{% if content_type.fieldDefinitionsByIdentifier[field_name].fieldTypeIdentifier == 'ezselection' %}
{% if content_type.fieldDefinitions.get(field_name).fieldTypeIdentifier == 'ezselection' %}
{% set selectionArray=field_value.value|split('-') %}
{% if selectionArray|length > 1 %}<ul>{% endif %}
{% for selected_key, selected_value in selectionArray %}
{% if loop.length == 1 %}
{{ content_type.fieldDefinitionsByIdentifier[field_name].fieldSettings.options[selected_value] }}<br>
{{ content_type.fieldDefinitions.get(field_name).fieldSettings.options[selected_value] }}<br>
{% else %}
<li>{{ content_type.fieldDefinitionsByIdentifier[field_name].fieldSettings.options[selected_value] }}</li><br>
<li>{{ content_type.fieldDefinitions.get(field_name).fieldSettings.options[selected_value] }}</li><br>
{% endif %}
{% endfor %}
{% if selectionArray|length > 1 %}</ul>{% endif %}
Expand Down

0 comments on commit 52b9532

Please sign in to comment.