Added attribute to store current form interface
authorThierry Florac <thierry.florac@onf.fr>
Mon, 13 May 2019 17:31:02 +0200
changeset 1308 4dd7d89350e0
parent 1307 8a0e2bc64193
child 1309 82c60033f08e
Added attribute to store current form interface
src/pyams_content/shared/common/zmi/types.py
--- a/src/pyams_content/shared/common/zmi/types.py	Mon May 13 16:08:34 2019 +0200
+++ b/src/pyams_content/shared/common/zmi/types.py	Mon May 13 17:31:02 2019 +0200
@@ -579,10 +579,12 @@
 class TypedSharedContentPropertiesEditForm(SharedContentPropertiesEditForm):
     """Typed shared content properties edit form"""
 
+    interface = IWfTypedSharedContent
+
     @property
     def fields(self):
-        fields = field.Fields(IWfTypedSharedContent).select('title', 'short_name', 'content_url',
-                                                            'data_type', 'header', 'description', 'notepad')
+        fields = field.Fields(self.interface).select('title', 'short_name', 'content_url',
+                                                     'data_type', 'header', 'description', 'notepad')
         fields['title'].widgetFactory = I18nSEOTextLineFieldWidget
         if not self.context.handle_content_url:
             fields = fields.omit('content_url')