phiamo/MopaBootstrapBundle — Issue #50: Add time_widget to Form/fields.html.twig view
Author: Dentxinho
Created: 2012-02-27 17:32:42+00:00
State: open

View `fields.html.twig` has a lot of useful block overrides, but i missed one: time_widget.
As we have date_widget and datetime_widget, it could be useful:

```
{% block time_widget %}
{% spaceless %}
{% if widget == 'single_text' %}
{{ block('field_widget') }}
{% else %}

{{ form_label(form, label) }}

{% set attr = attr|merge({'class': attr.class|default('') ~ ' inline-inputs'}) %}

{{ form_widget(form.hour, { 'attr': { 'size': '1' } }) }}:{{ form_widget(form.minute, { 'attr': { 'size': '1' } }) }}{% if with_seconds %}:{{ form_widget(form.second, { 'attr': { 'size': '1' } }) }}{% endif %}

{{ block('help') }}

{% endif %}
{% endspaceless %}
{% endblock time_widget %}
```