|
76 | 76 |
|
77 | 77 | {%- block choice_widget_collapsed -%} |
78 | 78 | {%- spaceless -%} |
| 79 | + {%- if form.parent.vars.block_prefixes[1] == 'date' -%} |
| 80 | + <div class="col-lg-4"> |
| 81 | + {{- block('choice_widget_collapsed_inner') -}} |
| 82 | + </div> |
| 83 | + {%- else -%} |
| 84 | + {%- if form.parent.vars.block_prefixes[1] == 'time' -%} |
| 85 | + <div class="col-lg-6"> |
| 86 | + {{- block('choice_widget_collapsed_inner') -}} |
| 87 | + </div> |
| 88 | + {%- else -%} |
| 89 | + {{- block('choice_widget_collapsed_inner') -}} |
| 90 | + {%- endif -%} |
| 91 | + {%- endif -%} |
| 92 | + {%- endspaceless -%} |
| 93 | +{%- endblock choice_widget_collapsed -%} |
| 94 | + |
| 95 | +{%- block choice_widget_collapsed_inner -%} |
| 96 | + {%- spaceless -%} |
| 97 | + {%- set attr = attr|merge({ 'class': attr.class|default('') ~ ' form-control'}) -%} |
| 98 | + |
79 | 99 | {%- if required and empty_value is none and not empty_value_in_choices -%} |
80 | 100 | {%- set required = false -%} |
81 | 101 | {%- endif -%} |
82 | | - <select {{ block('widget_attributes') }} class="form-control"{%- if multiple %} multiple="multiple"{%- endif -%}> |
| 102 | + <select {{ block('widget_attributes') }} class="{{- attr.class -}}"{%- if multiple %} multiple="multiple"{%- endif -%}> |
83 | 103 | {%- if empty_value is not none -%} |
84 | 104 | <option value=""{%- if required and value is empty %} selected="selected"{%- endif -%}>{{- empty_value|trans({}, translation_domain) -}}</option> |
85 | 105 | {%- endif -%} |
|
94 | 114 | {{- block('choice_widget_options') -}} |
95 | 115 | </select> |
96 | 116 | {%- endspaceless -%} |
97 | | -{%- endblock choice_widget_collapsed -%} |
| 117 | +{%- endblock choice_widget_collapsed_inner -%} |
98 | 118 |
|
99 | 119 | {%- block choice_widget_options -%} |
100 | 120 | {%- spaceless -%} |
|
128 | 148 | {%- if widget == 'single_text' -%} |
129 | 149 | {{- block('form_widget_simple') -}} |
130 | 150 | {%- else -%} |
| 151 | + {%- set attr = attr|merge({ 'class': attr.class|default('') ~ ' row'}) -%} |
131 | 152 | <div {{ block('widget_container_attributes') -}}> |
132 | 153 | {{- form_errors(form.date) -}} |
133 | 154 | {{- form_errors(form.time) -}} |
|
143 | 164 | {%- if widget == 'single_text' -%} |
144 | 165 | {{- block('form_widget_simple') -}} |
145 | 166 | {%- else -%} |
| 167 | + {%- set attr = attr|merge({ 'class': attr.class|default('') ~ ' row'}) -%} |
146 | 168 | <div {{ block('widget_container_attributes') -}}> |
147 | 169 | {{- date_pattern|replace({ |
148 | 170 | '{{ year }}': form_widget(form.year), |
|
160 | 182 | {{- block('form_widget_simple') -}} |
161 | 183 | {%- else -%} |
162 | 184 | {%- set vars = widget == 'text' ? { 'attr': { 'size': 1 }} : {} -%} |
| 185 | + {%- set attr = attr|merge({ 'class': attr.class|default('') ~ ' row'}) -%} |
163 | 186 | <div {{ block('widget_container_attributes') -}}> |
164 | 187 | {{- form_widget(form.hour, vars) -}} |
165 | 188 | {%- if with_minutes -%} |
|
235 | 258 | {%- spaceless -%} |
236 | 259 | {%- set type = type|default('email') -%} |
237 | 260 | {{- block('form_widget_simple') -}} |
238 | | - |
239 | | - {%- set type = type|default('text') -%} |
240 | | - <input type="{{- type -}}" value="{{- value -}}" {{ block('widget_attributes') -}} /> |
241 | 261 | {%- endspaceless -%} |
242 | 262 | {%- endblock email_widget -%} |
243 | 263 |
|
|
312 | 332 | <div class="col-lg-offset-2 col-lg-10"> |
313 | 333 | <div class="checkbox"> |
314 | 334 | {{- form_errors(form) -}} |
315 | | - <label for="label[{{- id -}}]" class="form-label"> |
| 335 | + <label id="label[{{- id -}}]" for="{{- id -}}" class="form-label"> |
316 | 336 | {{- form_widget(form) -}} |
317 | 337 | {{- label |trans({}, translation_domain) | raw -}} |
318 | 338 | </label> |
|
0 commit comments