mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-05 08:26:13 +00:00
add special layout for time field
This commit is contained in:
parent
ab52528f71
commit
0dd3dd2a1e
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -93,3 +93,17 @@ ul.custom_fields.choice li {
|
|||||||
font-family: 'open_sanslight';
|
font-family: 'open_sanslight';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// inline time input
|
||||||
|
.time_compound {
|
||||||
|
input[type=text], select {
|
||||||
|
width: 4em;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.separator {
|
||||||
|
margin-left: 0.2em;
|
||||||
|
margin-right: 0.2em;
|
||||||
|
}
|
||||||
|
}
|
@ -88,6 +88,18 @@
|
|||||||
{% endspaceless %}
|
{% endspaceless %}
|
||||||
{% endblock date_widget %}
|
{% 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 %}
|
{% block form_errors %}
|
||||||
{% spaceless %}
|
{% spaceless %}
|
||||||
{% if errors|length > 0 %}
|
{% if errors|length > 0 %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user