Handle container class in skin management forms
authorThierry Florac <tflorac@ulthar.net>
Tue, 13 Jul 2021 08:04:20 +0200
changeset 122 3b687562eac0
parent 121 bac29e04b922
child 123 c38e2021bf43
Handle container class in skin management forms
src/pyams_zmi/zmi/skin.py
--- a/src/pyams_zmi/zmi/skin.py	Fri Nov 13 16:38:36 2020 +0100
+++ b/src/pyams_zmi/zmi/skin.py	Tue Jul 13 08:04:20 2021 +0200
@@ -65,7 +65,8 @@
 
     @property
     def fields(self):
-        fields = field.Fields(IUserSkinnable).select('no_inherit_skin', 'skin', 'custom_stylesheet',
+        fields = field.Fields(IUserSkinnable).select('no_inherit_skin', 'skin',
+                                                     'container_class', 'custom_stylesheet',
                                                      'editor_stylesheet', 'custom_script')
         if self.context.can_inherit_skin:
             fields['no_inherit_skin'].widgetFactory = SingleCheckBoxFieldWidget
@@ -79,7 +80,8 @@
     def updateGroups(self):
         if self.context.can_inherit_skin:
             self.add_group(NamedWidgetsGroup(self, 'skin', self.widgets,
-                                             ('no_inherit_skin', 'skin', 'custom_stylesheet',
+                                             ('no_inherit_skin', 'skin',
+                                              'container_class', 'custom_stylesheet',
                                               'editor_stylesheet', 'custom_script'),
                                              legend=_("Don't inherit parent skin"),
                                              css_class='inner',