{# As long as Mautic 5 hasn't been released, and you make a change in one of the blocks below, also update the corresponding PHP template! #} {# Twig version of MauticCoreBundle:Views:FormTheme:Custom:button_attributes.html.php #} {% block button_attributes %} id="{{ id|escape }}" name="{{ full_name|escape }}" {{ disabled ? 'disabled="disabled"' : '' }} {% for k,v in attr|filter((v,k) => k not in ['icon']) %} {% if v in ['placeholder', 'title'] %} {{ '%s="%s" '|format(k|escape, v|trans({}, translation_domain)|escape)|raw }} {% elseif v is same as true %} {{ '%s="%s" '|format(k|escape, k|escape)|raw }} {% elseif v is not same as false %} {{ '%s="%s" '|format(k|escape, v|escape)|raw }} {% endif %} {% endfor %} {% endblock %} {# Twig version of MauticCoreBundle:Views:FormTheme:Custom:button_group_grow.html.php #} {% block button_group_row %} {% set hasErrors = form.vars.errors|length %} {% set feedbackClass = (app.request.getMethod() is same as 'POST' and hasErrors > 0) ? ' has-error' : '' %}