-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless #24728
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
Changes from 1 commit
60105bc
1fd87b0
b5cdb92
b370fe9
0e7e4b6
6dbdce0
9a0e8cb
fe4eda6
f0e97ba
6f07a0f
cbecd02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
{% use "bootstrap_3_layout.html.twig" %} | ||
|
||
{% block form_label_class -%} | ||
col-sm-2 | ||
{%- endblock form_label_class %} | ||
|
||
{% block form_group_class -%} | ||
col-sm-10 | ||
{%- endblock form_group_class %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same for this one. We try to not move snippets of code around as it makes merging branches more difficult. |
||
|
||
{% block form_start -%} | ||
{% set attr = attr|merge({class: (attr.class|default('') ~ ' form-horizontal')|trim}) %} | ||
{{- parent() -}} | ||
|
@@ -8,20 +16,14 @@ | |
{# Labels #} | ||
|
||
{% block form_label -%} | ||
{% spaceless %} | ||
{% if label is same as(false) %} | ||
<div class="{{ block('form_label_class') }}"></div> | ||
{% else %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these tags are missing the whitespace control to remove indentation spaces There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. changed. please review the recent commit, thanks! |
||
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) %} | ||
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) -%} | ||
{{- parent() -}} | ||
{% endif %} | ||
{% endspaceless %} | ||
{%- endblock form_label %} | ||
|
||
{% block form_label_class -%} | ||
col-sm-2 | ||
{%- endblock form_label_class %} | ||
|
||
{# Rows #} | ||
|
||
{% block form_row -%} | ||
|
@@ -35,27 +37,29 @@ col-sm-2 | |
{%- endblock form_row %} | ||
|
||
{% block submit_row -%} | ||
{% spaceless %} | ||
<div class="form-group"> | ||
<div class="{{ block('form_label_class') }}"></div> | ||
<div class="form-group">{#--#} | ||
<div class="{{ block('form_label_class') }}"></div>{#--#} | ||
<div class="{{ block('form_group_class') }}"> | ||
{{ form_widget(form) }} | ||
</div> | ||
</div>{#--#} | ||
</div> | ||
{% endspaceless %} | ||
{% endblock submit_row %} | ||
|
||
{% block reset_row -%} | ||
{% spaceless %} | ||
<div class="form-group"> | ||
<div class="{{ block('form_label_class') }}"></div> | ||
<div class="form-group">{#--#} | ||
<div class="{{ block('form_label_class') }}"></div>{#--#} | ||
<div class="{{ block('form_group_class') }}"> | ||
{{ form_widget(form) }} | ||
</div> | ||
</div>{#--#} | ||
</div> | ||
{% endspaceless %} | ||
{% endblock reset_row %} | ||
|
||
{% block form_group_class -%} | ||
col-sm-10 | ||
{%- endblock form_group_class %} | ||
{% block checkbox_row -%} | ||
<div class="form-group{% if not valid %} has-error{% endif %}">{#--#} | ||
<div class="{{ block('form_label_class') }}"></div>{#--#} | ||
<div class="{{ block('form_group_class') }}"> | ||
{{- form_widget(form) -}} | ||
{{- form_errors(form) -}} | ||
</div>{#--#} | ||
</div> | ||
{%- endblock checkbox_row %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
{% use "bootstrap_4_layout.html.twig" %} | ||
|
||
{% block form_label_class -%} | ||
col-sm-2 | ||
{%- endblock form_label_class %} | ||
|
||
{% block form_group_class -%} | ||
col-sm-10 | ||
{%- endblock form_group_class %} | ||
|
||
{# Labels #} | ||
|
||
{% block form_label -%} | ||
|
@@ -14,10 +22,6 @@ | |
{%- endif -%} | ||
{%- endblock form_label %} | ||
|
||
{% block form_label_class -%} | ||
col-sm-2 | ||
{%- endblock form_label_class %} | ||
|
||
{# Rows #} | ||
|
||
{% block form_row -%} | ||
|
@@ -47,23 +51,29 @@ col-sm-2 | |
{%- endblock fieldset_form_row %} | ||
|
||
{% block submit_row -%} | ||
<div class="form-group row"> | ||
<div class="{{ block('form_label_class') }}"></div> | ||
<div class="form-group row">{#--#} | ||
<div class="{{ block('form_label_class') }}"></div>{#--#} | ||
<div class="{{ block('form_group_class') }}"> | ||
{{- form_widget(form) -}} | ||
</div> | ||
</div>{#--#} | ||
</div> | ||
{%- endblock submit_row %} | ||
|
||
{% block reset_row -%} | ||
<div class="form-group row"> | ||
<div class="{{ block('form_label_class') }}"></div> | ||
<div class="form-group row">{#--#} | ||
<div class="{{ block('form_label_class') }}"></div>{#--#} | ||
<div class="{{ block('form_group_class') }}"> | ||
{{- form_widget(form) -}} | ||
</div> | ||
</div>{#--#} | ||
</div> | ||
{%- endblock reset_row %} | ||
|
||
{% block form_group_class -%} | ||
col-sm-10 | ||
{%- endblock form_group_class %} | ||
{% block checkbox_row -%} | ||
<div class="form-group row">{#--#} | ||
<div class="{{ block('form_label_class') }}"></div>{#--#} | ||
<div class="{{ block('form_group_class') }}"> | ||
{{- form_widget(form) -}} | ||
{{- form_errors(form) -}} | ||
</div>{#--#} | ||
</div> | ||
{%- endblock checkbox_row %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing end of line |
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.
Can you move back this snippet to where it was before? That would ease merging older branches. Thanks.