{# Widgets #} {%- block form_widget -%} {% if compound %} {{- block('form_widget_compound') -}} {% else %} {{- block('form_widget_simple') -}} {% endif %} {%- endblock form_widget -%} {%- block form_widget_simple -%} {%- set type = type|default('text') -%} {%- if type == 'range' or type == 'color' -%} {# Attribute "required" is not supported #} {%- set required = false -%} {%- endif -%} {%- endblock form_widget_simple -%} {%- block form_widget_compound -%} {%- if form is rootform -%} {{ form_errors(form) }} {%- endif -%} {{- block('form_rows') -}} {{- form_rest(form) -}} {%- endblock form_widget_compound -%} {%- block collection_widget -%} {% if prototype is defined and not prototype.rendered %} {%- set attr = attr|merge({'data-prototype': form_row(prototype) }) -%} {% endif %} {{- block('form_widget') -}} {%- endblock collection_widget -%} {%- block textarea_widget -%} {%- endblock textarea_widget -%} {%- block choice_widget -%} {% if expanded %} {{- block('choice_widget_expanded') -}} {% else %} {{- block('choice_widget_collapsed') -}} {% endif %} {%- endblock choice_widget -%} {%- block choice_widget_expanded -%}
| {{ form_label(form.years) }} | {% endif -%} {%- if with_months %}{{ form_label(form.months) }} | {% endif -%} {%- if with_weeks %}{{ form_label(form.weeks) }} | {% endif -%} {%- if with_days %}{{ form_label(form.days) }} | {% endif -%} {%- if with_hours %}{{ form_label(form.hours) }} | {% endif -%} {%- if with_minutes %}{{ form_label(form.minutes) }} | {% endif -%} {%- if with_seconds %}{{ form_label(form.seconds) }} | {% endif -%}
|---|---|---|---|---|---|---|
| {{ form_widget(form.years) }} | {% endif -%} {%- if with_months %}{{ form_widget(form.months) }} | {% endif -%} {%- if with_weeks %}{{ form_widget(form.weeks) }} | {% endif -%} {%- if with_days %}{{ form_widget(form.days) }} | {% endif -%} {%- if with_hours %}{{ form_widget(form.hours) }} | {% endif -%} {%- if with_minutes %}{{ form_widget(form.minutes) }} | {% endif -%} {%- if with_seconds %}{{ form_widget(form.seconds) }} | {% endif -%}