@@ -58,42 +58,46 @@ protected function configureFormFields(FormMapper $formMapper)
58
58
)
59
59
->add ('name ' , TextType::class)
60
60
->end () // group location
61
+ ;
61
62
62
- ->ifTrue (null === $ this ->getParentFieldDescription ())
63
- ->with ('form.group_target ' , ['class ' => 'col-md-9 ' ])
64
- ->add (
65
- 'content ' ,
66
- TreeSelectType::class,
67
- ['root_node ' => $ this ->contentRoot , 'widget ' => 'browser ' , 'required ' => false ]
68
- )
69
- ->end () // group general
70
- ->end () // tab general
71
-
72
- ->tab ('form.tab_routing ' )
73
- ->with ('form.group_path ' , ['class ' => 'col-md-6 ' ])
74
- ->add (
75
- 'variablePattern ' ,
76
- TextType::class,
77
- ['required ' => false ],
78
- ['help ' => 'form.help_variable_pattern ' ]
79
- )
80
- ->add (
81
- 'options ' ,
82
- ImmutableArrayType::class,
83
- ['keys ' => $ this ->configureFieldsForOptions ($ this ->getSubject ()->getOptions ())],
84
- ['help ' => 'form.help_options ' ]
85
- )
86
- ->end () // group path
87
-
88
- ->with ('form.group_defaults ' , ['class ' => 'col-md-6 ' ])
89
- ->add (
90
- 'defaults ' ,
91
- ImmutableArrayType::class,
92
- ['label ' => false , 'keys ' => $ this ->configureFieldsForDefaults ($ this ->getSubject ()->getDefaults ())]
93
- )
94
- ->end () // group data
95
- ->ifEnd ()
63
+ if (null === $ this ->getParentFieldDescription ()) {
64
+ $ formMapper
65
+ ->with ('form.group_target ' , ['class ' => 'col-md-9 ' ])
66
+ ->add (
67
+ 'content ' ,
68
+ TreeSelectType::class,
69
+ ['root_node ' => $ this ->contentRoot , 'widget ' => 'browser ' , 'required ' => false ]
70
+ )
71
+ ->end () // group general
72
+ ->end () // tab general
96
73
74
+ ->tab ('form.tab_routing ' )
75
+ ->with ('form.group_path ' , ['class ' => 'col-md-6 ' ])
76
+ ->add (
77
+ 'variablePattern ' ,
78
+ TextType::class,
79
+ ['required ' => false ],
80
+ ['help ' => 'form.help_variable_pattern ' ]
81
+ )
82
+ ->add (
83
+ 'options ' ,
84
+ ImmutableArrayType::class,
85
+ ['keys ' => $ this ->configureFieldsForOptions ($ this ->getSubject ()->getOptions ())],
86
+ ['help ' => 'form.help_options ' ]
87
+ )
88
+ ->end () // group path
89
+
90
+ ->with ('form.group_defaults ' , ['class ' => 'col-md-6 ' ])
91
+ ->add (
92
+ 'defaults ' ,
93
+ ImmutableArrayType::class,
94
+ ['label ' => false , 'keys ' => $ this ->configureFieldsForDefaults ($ this ->getSubject ()->getDefaults ())]
95
+ )
96
+ ->end () // group data
97
+ ;
98
+ }
99
+
100
+ $ formMapper
97
101
->end (); // tab general/routing
98
102
99
103
$ this ->addTransformerToField ($ formMapper ->getFormBuilder (), 'parentDocument ' );
0 commit comments