mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
add special layout for time field
This commit is contained in:
@@ -87,6 +87,18 @@
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
||||
{% endblock date_widget %}
|
||||
|
||||
{%- block time_widget -%}
|
||||
{%- if widget == 'single_text' -%}
|
||||
{{ block('form_widget_simple') }}
|
||||
{%- else -%}
|
||||
{%- set vars = widget == 'text' ? { 'attr': { 'size': 1 }} : {} -%}
|
||||
{% set attr = {'class' : 'time_compound ' ~ attr.class|default('') } %}
|
||||
<div {{ block('widget_container_attributes') }}>
|
||||
{{ form_widget(form.hour, vars) }}{% if with_minutes %}<span class="separator">:</span>{{ form_widget(form.minute, vars) }}{% endif %}{% if with_seconds %}<span class="separator">:</span>{{ form_widget(form.second, vars) }}{% endif %}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{%- endblock time_widget -%}
|
||||
|
||||
{% block form_errors %}
|
||||
{% spaceless %}
|
||||
|
Reference in New Issue
Block a user