replace 'hideLabel' form option by 'fullWidth'

sometimes we want fullWidth and display label
This commit is contained in:
Mathieu Jaumotte 2022-07-13 13:35:37 +02:00
parent bda203d11d
commit fe595860f2
5 changed files with 5 additions and 5 deletions

View File

@ -59,7 +59,7 @@ class CommentType extends AbstractType
$view->vars = array_replace(
$view->vars,
[
'hideLabel' => true,
'fullWidth' => true,
]
);
}

View File

@ -46,7 +46,7 @@ class PrivateCommentType extends AbstractType
public function buildView(FormView $view, FormInterface $form, array $options)
{
$view->vars['hideLabel'] = true;
$view->vars['fullWidth'] = true;
}
public function configureOptions(OptionsResolver $resolver)

View File

@ -108,7 +108,7 @@ class ScopePickerType extends AbstractType
$view->vars = array_replace(
$view->vars,
[
'hideLabel' => true,
'fullWidth' => true,
]
);
}

View File

@ -60,7 +60,7 @@
{{- form_errors(form) -}}
</div>
{%- else -%}
{% if form.vars.hideLabel is not defined or form.vars.hideLabel == false %}
{% if form.vars.fullWidth is not defined or form.vars.fullWidth == false %}
{{- form_label(form) -}}
<div class="{{ block('form_group_class') }}">
{{- form_widget(form, widget_attr) -}}

View File

@ -18,7 +18,7 @@
{% block form_row %}
{% apply spaceless %}
{% if form.vars.hideLabel is not defined or form.vars.hideLabel == false %}
{% if form.vars.fullWidth is not defined or form.vars.fullWidth == false %}
<div class="mb-2">
<div class="row">
<div class="{% apply spaceless %}