Skip to content

Commit

Permalink
Column size can be defined using form builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Eckerstorfer committed Nov 24, 2013
1 parent 886429b commit 1f24157
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Resources/views/Form/bootstrap.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
{% if attr.simple_col is defined and attr.simple_col is not empty %}
{% set simple_col = attr.simple_col %}
{% endif %}
{% if attr.col_size is defined and attr.col_size is not empty %}
{% set col_size = attr.col_size %}
{% endif %}

{% if simple_col is defined %}
<div class="col-{{ col_size }}-{{ simple_col }}">
Expand Down Expand Up @@ -121,6 +124,10 @@
{% set simple_col = attr.simple_col %}
{% endif %}

{% if attr.col_size is defined and attr.col_size is not empty %}
{% set col_size = attr.col_size %}
{% endif %}

{% if simple_col is defined %}
<div class="col-{{ col_size }}-{{ simple_col }}">
{% endif %}
Expand Down Expand Up @@ -204,6 +211,9 @@
{% if attr.widget_col is defined and attr.widget_col is not empty %}
{% set widget_col = attr.widget_col %}
{% endif %}
{% if attr.col_size is defined and attr.col_size is not empty %}
{% set col_size = attr.col_size %}
{% endif %}

{% set class = '' %}
{% if align_with_widget is defined or attr.align_with_widget is defined %}
Expand Down Expand Up @@ -256,6 +266,9 @@
{% if attr.widget_col is defined and attr.widget_col is not empty %}
{% set widget_col = attr.widget_col %}
{% endif %}
{% if attr.col_size is defined and attr.col_size is not empty %}
{% set col_size = attr.col_size %}
{% endif %}

{% if align_with_widget is defined or attr.align_with_widget is defined %}
{% set widget_col = widget_col|default(10) %}
Expand Down Expand Up @@ -467,6 +480,9 @@
{% if attr.widget_col is defined and attr.widget_col is not empty %}
{% set widget_col = attr.widget_col %}
{% endif %}
{% if attr.col_size is defined and attr.col_size is not empty %}
{% set col_size = attr.col_size %}
{% endif %}

{% if label is not sameas(false) %}
{% set style = style|default(bootstrap_get_style()) %}
Expand Down Expand Up @@ -518,6 +534,9 @@
{% if attr.widget_col is defined and attr.widget_col is not empty %}
{% set widget_col = attr.widget_col %}
{% endif %}
{% if attr.col_size is defined and attr.col_size is not empty %}
{% set col_size = attr.col_size %}
{% endif %}

{% set label_col = label_col|default(2) %}
{% set widget_col = widget_col|default(10) %}
Expand Down Expand Up @@ -599,6 +618,9 @@
{% if attr.widget_col is defined and attr.widget_col is not empty %}
{% set widget_col = attr.widget_col %}
{% endif %}
{% if attr.col_size is defined and attr.col_size is not empty %}
{% set col_size = attr.col_size %}
{% endif %}

{% set label_col = label_col|default(2) %}
{% set widget_col = widget_col|default(10) %}
Expand Down

0 comments on commit 1f24157

Please sign in to comment.