Updated form's groups display mode API
authorThierry Florac <thierry.florac@onf.fr>
Wed, 30 May 2018 16:27:07 +0200
changeset 570 196121e4a6f4
parent 569 9a5f52b5d876
child 571 b2e79295caec
child 656 0abdc1492e03
Updated form's groups display mode API
src/pyams_content/component/gallery/zmi/file.py
src/pyams_content/component/paragraph/zmi/video.py
src/pyams_content/component/video/zmi/paragraph.py
--- a/src/pyams_content/component/gallery/zmi/file.py	Wed May 30 15:21:46 2018 +0200
+++ b/src/pyams_content/component/gallery/zmi/file.py	Wed May 30 16:27:07 2018 +0200
@@ -216,7 +216,7 @@
                                          legend=_("Audio content"),
                                          css_class='inner',
                                          switch=True,
-                                         hide_if_empty=True))
+                                         display_mode='auto'))
         super(GalleryFilePropertiesEditForm, self).updateGroups()
 
 
--- a/src/pyams_content/component/paragraph/zmi/video.py	Wed May 30 15:21:46 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/video.py	Wed May 30 16:27:07 2018 +0200
@@ -84,7 +84,7 @@
                                          legend=_("HTML content"),
                                          css_class='inner switcher padding-right-10 no-y-padding pull-left',
                                          switch=True,
-                                         hide_if_empty=True))
+                                         display_mode='auto'))
         self.add_group(NamedWidgetsGroup(self, 'data_group', self.widgets,
                                          ('description', 'author', 'data', 'renderer'),
                                          bordered=False))
@@ -134,7 +134,7 @@
                                          legend=_("HTML content"),
                                          css_class='inner switcher padding-right-10 no-y-padding pull-left',
                                          switch=True,
-                                         hide_if_empty=True))
+                                         display_mode='auto'))
         self.add_group(NamedWidgetsGroup(self, 'data_group', self.widgets,
                                          ('description', 'author', 'data', 'renderer'),
                                          bordered=False))
--- a/src/pyams_content/component/video/zmi/paragraph.py	Wed May 30 15:21:46 2018 +0200
+++ b/src/pyams_content/component/video/zmi/paragraph.py	Wed May 30 16:27:07 2018 +0200
@@ -103,7 +103,7 @@
                                              legend=_("HTML content"),
                                              css_class='inner switcher padding-right-10 no-y-padding pull-left',
                                              switch=True,
-                                             hide_if_empty=True))
+                                             display_mode='auto'))
             self.add_group(NamedWidgetsGroup(self, 'data_group', self.widgets,
                                              ('description', 'author', 'renderer', 'provider_name'),
                                              bordered=False))
@@ -174,7 +174,7 @@
                                              legend=_("Other settings"),
                                              css_class="inner switcher padding-right-10 no-y-padding",
                                              switch=True,
-                                             hide_if_empty=True))
+                                             display_mode='auto'))
         super(ExternalVideoProviderSettingsAddForm, self).updateGroups()
 
 
@@ -238,7 +238,7 @@
                                              legend=_("HTML content"),
                                              css_class='inner switcher padding-right-10 no-y-padding pull-left',
                                              switch=True,
-                                             hide_if_empty=True))
+                                             display_mode='auto'))
             self.add_group(NamedWidgetsGroup(self, 'data_group', self.widgets,
                                              ('description', 'author', 'renderer', 'provider_name'),
                                              bordered=False))
@@ -260,7 +260,7 @@
                                                      fieldset_class='margin-top-10 padding-y-5',
                                                      css_class='inner switcher padding-right-10 no-y-padding pull-left',
                                                      switch=True,
-                                                     hide_if_empty=True))
+                                                     display_mode='never'))
 
 
 @view_config(name='properties.json', context=IExternalVideoParagraph, request_type=IPyAMSLayer,