Skip to content

Commit

Permalink
IBX-3698: Conditional icon for form_help (#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasOsti authored Sep 11, 2023
1 parent 8bf80ee commit d5af11c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,14 @@
{% block form_help -%}
{%- if help is not empty -%}
{%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' ibexa-form-help')|trim}) -%}
{%- set with_icon = help_attr.with_icon is defined ? help_attr.with_icon : true -%}

<small id="{{ id }}_help"{% with { attr: help_attr } %}{{ block('attributes') }}{% endwith %}>
<svg class="ibexa-icon ibexa-icon--small ibexa-form-help__icon">
<use xlink:href="{{ ibexa_icon_path('system-information') }}"></use>
</svg>
{% if with_icon %}
<svg class="ibexa-icon ibexa-icon--small ibexa-form-help__icon">
<use xlink:href="{{ ibexa_icon_path('system-information') }}"></use>
</svg>
{% endif %}
<div class="ibexa-form-help__content">
{%- if translation_domain is same as(false) -%}
{%- if help_html is same as(false) -%}
Expand Down

0 comments on commit d5af11c

Please sign in to comment.