mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Choice widget expanded use the .inline_choice class & choice_with_other_widget display the label and the input on the same line
This commit is contained in:
@@ -52,25 +52,42 @@
|
||||
{% spaceless %}
|
||||
<div {{ block('widget_container_attributes') }}>
|
||||
{% for child in form %}
|
||||
{{ form_widget(child) }}
|
||||
{{ form_label(child, '', {'label_attr': { 'class' : 'inline'} }) }}
|
||||
<span class="inline-choice">
|
||||
{{ form_widget(child) }}
|
||||
{{ form_label(child, '', {'label_attr': { 'class' : 'inline'} }) }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endspaceless %}
|
||||
{% endblock choice_widget_expanded %}
|
||||
|
||||
|
||||
{% block choice_with_other_widget %}
|
||||
{% spaceless %}
|
||||
{% for child in form._choices %}
|
||||
<div class="blop">
|
||||
{{ form_widget(child) }}
|
||||
{{ form_label(child, '', {'label_attr': { 'class' : 'inline'} }) }}
|
||||
</div>
|
||||
{%- if child.vars.value != '_other' -%}
|
||||
<div class="inline-choice">
|
||||
{{ form_widget(child) }}
|
||||
{{ form_label(child, '', {'label_attr': { 'class' : 'inline'} }) }}
|
||||
</div>
|
||||
{%- else -%}
|
||||
<div class="container">
|
||||
<div class="grid-6 grid-tablet-12 gid-mobile-12 no-gutter">
|
||||
<span class="inline-choice">
|
||||
{{ form_widget(child) }}
|
||||
{{ form_label(child, '', {'label_attr': { 'class' : 'inline'} }) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="grid-6 grid-tablet-12 gid-mobile-12 no-gutter">
|
||||
{{ form_widget(form._other, {'attr': {'class': 'input-text-other-value'} }) }}
|
||||
</div>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{% endfor %}
|
||||
{{ form_widget(form._other, {'attr': {'class': 'input-text-other-value'} }) }}
|
||||
{% endspaceless %}
|
||||
{% endblock choice_with_other_widget %}
|
||||
|
||||
|
||||
{% block date_widget %}
|
||||
{% spaceless %}
|
||||
{% if widget == 'single_text' %}
|
||||
|
Reference in New Issue
Block a user