mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fixed template horizontal form theme for ckeditor comments fields with fullWidth parameter
Notes: The 'fullwidth' parameter allow to force enlarge textarea ckeditor field, escaping horizontal bootstrap theme position rule (4/12 - 8/12)
This commit is contained in:
parent
c953da3fd0
commit
ef3b41fa90
@ -56,12 +56,7 @@ class CommentType extends AbstractType
|
|||||||
|
|
||||||
public function buildView(FormView $view, FormInterface $form, array $options)
|
public function buildView(FormView $view, FormInterface $form, array $options)
|
||||||
{
|
{
|
||||||
$view->vars = array_replace(
|
$view->vars['fullWidth'] = true;
|
||||||
$view->vars,
|
|
||||||
[
|
|
||||||
'fullWidth' => true,
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
|
@ -95,12 +95,7 @@ class ScopePickerType extends AbstractType
|
|||||||
|
|
||||||
public function buildView(FormView $view, FormInterface $form, array $options)
|
public function buildView(FormView $view, FormInterface $form, array $options)
|
||||||
{
|
{
|
||||||
$view->vars = array_replace(
|
$view->vars['fullWidth'] = true;
|
||||||
$view->vars,
|
|
||||||
[
|
|
||||||
'fullWidth' => true,
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
|
@ -18,41 +18,42 @@
|
|||||||
|
|
||||||
{% block form_row %}
|
{% block form_row %}
|
||||||
{% apply spaceless %}
|
{% apply spaceless %}
|
||||||
{% if form.vars.fullWidth is not defined or form.vars.fullWidth == false %}
|
|
||||||
<div class="mb-2">
|
<div class="mb-2">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="{% apply spaceless %}
|
{% if form.vars.fullWidth is not defined or form.vars.fullWidth == false %} {# here #}
|
||||||
{% if attr.class is defined and ('cf-title' in attr.class or 'cf-fields' in attr.class ) %}
|
<div class="{% apply spaceless %}
|
||||||
col-sm-12
|
{% if attr.class is defined and ('cf-title' in attr.class or 'cf-fields' in attr.class ) %}
|
||||||
{% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %}
|
col-sm-12
|
||||||
col-sm-2 col-md-4 clear
|
{% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %}
|
||||||
{% else %}
|
col-sm-2 col-md-4 clear
|
||||||
col-sm-4 clear
|
{% else %}
|
||||||
|
col-sm-4 clear
|
||||||
|
{% endif %}
|
||||||
|
{% endapply %}">
|
||||||
|
{% if attr.class is not defined or ('cf-title' not in attr.class and 'cf-fields' not in attr.class ) %}
|
||||||
|
{{ form_label(form) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endapply %}">
|
</div>
|
||||||
{% if attr.class is not defined or ('cf-title' not in attr.class and 'cf-fields' not in attr.class ) %}
|
<div class="{% apply spaceless %}
|
||||||
{{ form_label(form) }}
|
{% if attr.class is defined and 'cf-title' in attr.class %}
|
||||||
|
col-sm-12
|
||||||
|
{% elseif attr.class is defined and 'cf-fields' in attr.class %}
|
||||||
|
col-sm-12 parent
|
||||||
|
{% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %}
|
||||||
|
col-sm-2 col-md-8 multiple-cf-inline
|
||||||
|
{% else %}
|
||||||
|
col-sm-8
|
||||||
|
{% endif %}
|
||||||
|
{% endapply %}">
|
||||||
|
{{ form_widget(form) }}
|
||||||
|
{{ form_errors(form) }}
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="col-12 clear">{{ form_label(form) }}</div>
|
||||||
|
<div class="col-12">{{ form_widget(form) }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
<div class="{% apply spaceless %}
|
|
||||||
{% if attr.class is defined and 'cf-title' in attr.class %}
|
|
||||||
col-sm-12
|
|
||||||
{% elseif attr.class is defined and 'cf-fields' in attr.class %}
|
|
||||||
col-sm-12 parent
|
|
||||||
{% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %}
|
|
||||||
col-sm-2 col-md-8 multiple-cf-inline
|
|
||||||
{% else %}
|
|
||||||
col-sm-8
|
|
||||||
{% endif %}
|
|
||||||
{% endapply %}">
|
|
||||||
{{ form_widget(form) }}
|
|
||||||
{{ form_errors(form) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
|
||||||
{{ form_widget(form) }}
|
|
||||||
{% endif %}
|
|
||||||
{% endapply %}
|
{% endapply %}
|
||||||
{% endblock form_row %}
|
{% endblock form_row %}
|
||||||
|
|
||||||
@ -210,11 +211,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block comment_row %}
|
|
||||||
{{ form_label(form) }}
|
|
||||||
{{ form_row(form) }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block comment_widget %}
|
{% block comment_widget %}
|
||||||
{% for entry in form %}
|
{% for entry in form %}
|
||||||
{{ form_widget(entry) }}
|
{{ form_widget(entry) }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user