Skip to content

Commit d5af11c

Browse files
authored
IBX-3698: Conditional icon for form_help (#889)
1 parent 8bf80ee commit d5af11c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,14 @@
383383
{% block form_help -%}
384384
{%- if help is not empty -%}
385385
{%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' ibexa-form-help')|trim}) -%}
386+
{%- set with_icon = help_attr.with_icon is defined ? help_attr.with_icon : true -%}
387+
386388
<small id="{{ id }}_help"{% with { attr: help_attr } %}{{ block('attributes') }}{% endwith %}>
387-
<svg class="ibexa-icon ibexa-icon--small ibexa-form-help__icon">
388-
<use xlink:href="{{ ibexa_icon_path('system-information') }}"></use>
389-
</svg>
389+
{% if with_icon %}
390+
<svg class="ibexa-icon ibexa-icon--small ibexa-form-help__icon">
391+
<use xlink:href="{{ ibexa_icon_path('system-information') }}"></use>
392+
</svg>
393+
{% endif %}
390394
<div class="ibexa-form-help__content">
391395
{%- if translation_domain is same as(false) -%}
392396
{%- if help_html is same as(false) -%}

0 commit comments

Comments
 (0)