src/pyams_content/shared/common/zmi/types.py
changeset 1308 4dd7d89350e0
parent 1070 ea0c7ac589c4
equal deleted inserted replaced
1307:8a0e2bc64193 1308:4dd7d89350e0
   577 @ajax_config(name='properties.json', context=IWfTypedSharedContent, layer=IPyAMSLayer,
   577 @ajax_config(name='properties.json', context=IWfTypedSharedContent, layer=IPyAMSLayer,
   578              permission=MANAGE_CONTENT_PERMISSION)
   578              permission=MANAGE_CONTENT_PERMISSION)
   579 class TypedSharedContentPropertiesEditForm(SharedContentPropertiesEditForm):
   579 class TypedSharedContentPropertiesEditForm(SharedContentPropertiesEditForm):
   580     """Typed shared content properties edit form"""
   580     """Typed shared content properties edit form"""
   581 
   581 
       
   582     interface = IWfTypedSharedContent
       
   583 
   582     @property
   584     @property
   583     def fields(self):
   585     def fields(self):
   584         fields = field.Fields(IWfTypedSharedContent).select('title', 'short_name', 'content_url',
   586         fields = field.Fields(self.interface).select('title', 'short_name', 'content_url',
   585                                                             'data_type', 'header', 'description', 'notepad')
   587                                                      'data_type', 'header', 'description', 'notepad')
   586         fields['title'].widgetFactory = I18nSEOTextLineFieldWidget
   588         fields['title'].widgetFactory = I18nSEOTextLineFieldWidget
   587         if not self.context.handle_content_url:
   589         if not self.context.handle_content_url:
   588             fields = fields.omit('content_url')
   590             fields = fields.omit('content_url')
   589         if not self.context.handle_header:
   591         if not self.context.handle_header:
   590             fields = fields.omit('header')
   592             fields = fields.omit('header')