8000 [Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless by arkste · Pull Request #24728 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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

Closed
wants to merge 11 commits into from
Closed
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[TwigBridge] revert form_label_class & form_group_class change
  • Loading branch information
arkste committed Oct 30, 2017
commit 9a0e8cb1d99781e089116c55c420bec0c62c5d8d
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{% 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 %}

{% block form_start -%}
{% set attr = attr|merge({class: (attr.class|default('') ~ ' form-horizontal')|trim}) %}
{{- parent() -}}
Expand All @@ -24,6 +16,10 @@ col-sm-10
{%- endif -%}
{%- endblock form_label %}

{% block form_label_class -%}
col-sm-2
{%- endblock form_label_class %}

{# Rows #}

{% block form_row -%}
Expand Down Expand Up @@ -54,6 +50,10 @@ col-sm-10
</div>
{%- 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>{#--#}
Expand All @@ -62,4 +62,4 @@ col-sm-10
{{- form_errors(form) -}}
</div>{#--#}
</div>
{%- endblock checkbox_row %}
{%- endblock checkbox_row %}
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{% 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 -%}
Expand All @@ -22,6 +14,10 @@ col-sm-10
{%- endif -%}
{%- endblock form_label %}

{% block form_label_class -%}
col-sm-2
{%- endblock form_label_class %}

{# Rows #}

{% block form_row -%}
Expand Down Expand Up @@ -68,6 +64,10 @@ col-sm-10
</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>{#--#}
Expand Down
0