@@ -109,18 +109,33 @@ class="form-validate">
109109
110110 <?php
111111 $ this ->fieldsets = [];
112- $ this ->ignore_fieldsets = ['basic ' , 'description ' ];
112+ $ this ->ignore_fieldsets = ['basic ' , 'description ' , ' assigned ' ];
113113 echo LayoutHelper::render ('joomla.edit.params ' , $ this );
114114 ?>
115115
116116 <?php if ($ user ->authorise ('core.edit ' , 'com_menus ' ) && $ this ->item ->client_id == 0 && $ this ->canDo ->get ('core.edit.state ' )) : ?>
117117 <?php echo HTMLHelper::_ ('uitab.addTab ' , 'myTab ' , 'assignment ' , Text::_ ('COM_TEMPLATES_MENUS_ASSIGNMENT ' )); ?>
118- <fieldset id="fieldset-assignment" class="options-form">
119- <legend><?php echo Text::_ ('COM_TEMPLATES_MENUS_ASSIGNMENT ' ); ?> </legend>
120- <div>
121- <?php echo $ this ->loadTemplate ('assignment ' ); ?>
122- </div>
123- </fieldset>
118+ <?php if ($ this ->form ->getGroup ('assigned ' )) : ?>
119+ <?php
120+ $ this ->ignore_fieldsets = ['basic ' ];
121+ $ this ->fieldset = 'assigned ' ;
122+
123+ foreach ($ this ->form ->getFieldsets () as $ fieldSet ) {
124+ if ($ fieldSet ->name !== 'assigned ' ) {
125+ $ this ->ignore_fieldsets [] = $ fieldSet ->name ;
126+ }
127+ }
128+
129+ echo LayoutHelper::render ('joomla.edit.fieldset ' , $ this );
130+ ?>
131+ <?php else : ?>
132+ <fieldset id="fieldset-assignment" class="options-form">
133+ <legend><?php echo Text::_ ('COM_TEMPLATES_MENUS_ASSIGNMENT ' ); ?> </legend>
134+ <div>
135+ <?php echo $ this ->loadTemplate ('assignment ' ); ?>
136+ </div>
137+ </fieldset>
138+ <?php endif ; ?>
124139 <?php echo HTMLHelper::_ ('uitab.endTab ' ); ?>
125140 <?php endif ; ?>
126141
0 commit comments