New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Allows row_attr
on form rows
#14693
Conversation
Hi @Prometee! |
row_attr
on form rowsrow_attr
on form rows
@jakubtobiasz sure ! It's done. |
bb16d36
to
828ce8f
Compare
@@ -1,7 +1,14 @@ | |||
{% extends 'form_div_layout.html.twig' %} | |||
|
|||
{% block form_row -%} | |||
<div class="{% if required %}required {% endif %}field{% if (not compound or force_error|default(false)) and not valid %} error{% endif %}"> | |||
{% set row_attr=row_attr|merge({'class': row_attr.class|default ~ ' field'}) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% set row_attr=row_attr|merge({'class': row_attr.class|default ~ ' field'}) %} | |
{% set row_attr = row_attr|merge({'class': row_attr.class|default ~ ' field'}) %} |
<div class="{% if required %}required {% endif %}field{% if (not compound or force_error|default(false)) and not valid %} error{% endif %}"> | ||
{% set row_attr=row_attr|merge({'class': row_attr.class|default ~ ' field'}) %} | ||
{% if required %} | ||
{% set row_attr=row_attr|merge({'class': row_attr.class|default ~ ' required'}) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% set row_attr=row_attr|merge({'class': row_attr.class|default ~ ' required'}) %} | |
{% set row_attr = row_attr|merge({'class': row_attr.class|default ~ ' required'}) %} |
{% set row_attr=row_attr|merge({'class': row_attr.class|default ~ ' required'}) %} | ||
{% endif %} | ||
{% if (not compound or force_error|default(false)) and not valid %} | ||
{% set row_attr=row_attr|merge({'class': row_attr.class|default ~ ' error'}) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% set row_attr=row_attr|merge({'class': row_attr.class|default ~ ' error'}) %} | |
{% set row_attr = row_attr|merge({'class': row_attr.class|default ~ ' error'}) %} |
Thank you, Francis! 🎉 |
This PR allows to use
row_attr
of eachform_row
which wasn't possible with the current code.