578 @ajax_config(name='properties.json', context=IWfTypedSharedContent, layer=IPyAMSLayer, |
578 @ajax_config(name='properties.json', context=IWfTypedSharedContent, layer=IPyAMSLayer, |
579 permission=MANAGE_CONTENT_PERMISSION) |
579 permission=MANAGE_CONTENT_PERMISSION) |
580 class TypedSharedContentProperteisEditForm(SharedContentPropertiesEditForm): |
580 class TypedSharedContentProperteisEditForm(SharedContentPropertiesEditForm): |
581 """Typed shared content properties edit form""" |
581 """Typed shared content properties edit form""" |
582 |
582 |
583 fields = field.Fields(IWfTypedSharedContent).select('title', 'short_name', 'content_url', |
583 @property |
584 'data_type', 'description', 'notepad') |
584 def fields(self): |
585 fields['title'].widgetFactory = I18nSEOTextLineFieldWidget |
585 fields = field.Fields(IWfTypedSharedContent).select('title', 'short_name', 'content_url', |
|
586 'data_type', 'header', 'description', 'notepad') |
|
587 fields['title'].widgetFactory = I18nSEOTextLineFieldWidget |
|
588 if not self.context.handle_content_url: |
|
589 fields = fields.omit('content_url') |
|
590 if not self.context.handle_header: |
|
591 fields = fields.omit('header') |
|
592 if not self.context.handle_description: |
|
593 fields = fields.omit('description') |
|
594 return fields |