diff --git a/Form/Extension/TabbedFormTypeExtension.php b/Form/Extension/TabbedFormTypeExtension.php index 8f5702029..d7a28455d 100644 --- a/Form/Extension/TabbedFormTypeExtension.php +++ b/Form/Extension/TabbedFormTypeExtension.php @@ -100,6 +100,7 @@ public function finishView(FormView $view, FormInterface $form, array $options) 'label' => $child->vars['label'], 'icon' => $child->vars['icon'], 'active' => false, + 'disabled' => $child->vars['disabled'], 'translation_domain' => $child->vars['translation_domain'], ); diff --git a/Form/Type/TabType.php b/Form/Type/TabType.php index 4e49be6ea..cf012d5f2 100644 --- a/Form/Type/TabType.php +++ b/Form/Type/TabType.php @@ -31,6 +31,7 @@ public function setDefaultOptions(OptionsResolverInterface $resolver) $resolver->setDefaults(array( 'icon' => null, 'error_icon' => 'remove-sign', + 'disabled' => false, )); } @@ -42,6 +43,7 @@ public function buildView(FormView $view, FormInterface $form, array $options) $view->vars['valid'] = $valid = !$form->isSubmitted() || $form->isValid(); $view->vars['icon'] = $valid ? $options['icon'] : $options['error_icon']; $view->vars['tab_active'] = false; + $view->vars['disabled'] = $options['disabled']; $view->parent->vars['tabbed'] = true; } diff --git a/Resources/views/Form/fields.html.twig b/Resources/views/Form/fields.html.twig index e9c56e8c3..ea3c1536b 100644 --- a/Resources/views/Form/fields.html.twig +++ b/Resources/views/Form/fields.html.twig @@ -128,7 +128,8 @@ {% spaceless %}