fix bug with bootstrap form theme textarea (horizontal layout mode)

cfr issue https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/182
+ make chill fields theme more responsive
This commit is contained in:
Mathieu Jaumotte 2021-07-26 17:56:44 +02:00
parent a6266c5317
commit 376d8df55e
4 changed files with 47 additions and 43 deletions

View File

@ -108,8 +108,6 @@
{{ chill_pagination(paginator) }} {{ chill_pagination(paginator) }}
{% endif %} {% endif %}
{% form_theme form_add_event_participation_by_person 'bootstrap_4_layout.html.twig' %}
<div class="input-group mb-3"> <div class="input-group mb-3">
{{ form_start(form_add_event_participation_by_person) }} {{ form_start(form_add_event_participation_by_person) }}
{# {#

View File

@ -4,8 +4,6 @@
{% block title 'Participation creation'|trans %} {% block title 'Participation creation'|trans %}
{% form_theme form _self %}
{% block _collection_row %} {% block _collection_row %}
<tr> <tr>
<td> <td>

View File

@ -60,14 +60,22 @@
{{- form_errors(form) -}} {{- form_errors(form) -}}
</div> </div>
{%- else -%} {%- else -%}
{{- form_label(form) -}} {% if form.vars.hideLabel is not defined or form.vars.hideLabel == false %}
<div class="{{ block('form_group_class') }}"> {{- form_label(form) -}}
{{- form_widget(form, widget_attr) -}} <div class="{{ block('form_group_class') }}">
{{- form_help(form) -}} {{- form_widget(form, widget_attr) -}}
{{- form_errors(form) -}} {{- form_help(form) -}}
</div> {{- form_errors(form) -}}
</div>
{% else %}
<div class="col-sm">
{{- form_widget(form, widget_attr) -}}
{{- form_help(form) -}}
{{- form_errors(form) -}}
</div>
{% endif %}
{%- endif -%} {%- endif -%}
{##}</div> </div>
{%- endif -%} {%- endif -%}
{%- endblock form_row %} {%- endblock form_row %}

View File

@ -23,11 +23,11 @@
<div class="row"> <div class="row">
<div class="{% apply spaceless %} <div class="{% apply spaceless %}
{% if attr.class is defined and ('cf-title' in attr.class or 'cf-fields' in attr.class ) %} {% if attr.class is defined and ('cf-title' in attr.class or 'cf-fields' in attr.class ) %}
col-12 col-sm-12
{% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %} {% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %}
col-2 col-md-4 clear col-sm-2 col-md-4 clear
{% else %} {% else %}
col-4 clear col-sm-4 clear
{% endif %} {% endif %}
{% endapply %}"> {% endapply %}">
{% if attr.class is not defined or ('cf-title' not in attr.class and 'cf-fields' not in attr.class ) %} {% if attr.class is not defined or ('cf-title' not in attr.class and 'cf-fields' not in attr.class ) %}
@ -36,13 +36,13 @@
</div> </div>
<div class="{% apply spaceless %} <div class="{% apply spaceless %}
{% if attr.class is defined and 'cf-title' in attr.class %} {% if attr.class is defined and 'cf-title' in attr.class %}
col-12 col-sm-12
{% elseif attr.class is defined and 'cf-fields' in attr.class %} {% elseif attr.class is defined and 'cf-fields' in attr.class %}
col-12 parent col-sm-12 parent
{% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %} {% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %}
col-2 col-md-8 multiple-cf-inline col-sm-2 col-md-8 multiple-cf-inline
{% else %} {% else %}
col-8 col-sm-8
{% endif %} {% endif %}
{% endapply %}"> {% endapply %}">
{{ form_widget(form) }} {{ form_widget(form) }}