Updated schema field for data attribute
authortflorac@xsup98-004.onf.fr
Thu, 12 Oct 2017 22:26:26 +0200
changeset 200 af969d925a91
parent 199 d82d8670735e
child 201 46819098e77a
Updated schema field for data attribute
src/pyams_content/component/extfile/interfaces/__init__.py
--- a/src/pyams_content/component/extfile/interfaces/__init__.py	Thu Oct 12 22:25:19 2017 +0200
+++ b/src/pyams_content/component/extfile/interfaces/__init__.py	Thu Oct 12 22:26:26 2017 +0200
@@ -19,7 +19,8 @@
 from pyams_content.component.association.interfaces import IAssociationItem, IAssociationTarget
 
 # import packages
-from pyams_i18n.schema import I18nTextLineField, I18nTextField, I18nFileField, I18nThumbnailImageField
+from pyams_i18n.schema import I18nTextLineField, I18nTextField, I18nFileField, I18nThumbnailImageField, \
+    I18nVideoField, I18nAudioField
 from zope.schema import TextLine, Choice
 
 from pyams_content import _
@@ -65,14 +66,14 @@
 class IExtMedia(IExtFile):
     """External media file interface"""
 
+
+class IExtImage(IExtMedia):
+    """External image file interface"""
+
     title = I18nTextLineField(title=_("Legend"),
                               description=_("File legend, as shown in front-office"),
                               required=False)
 
-
-class IExtImage(IExtMedia):
-    """External image file interface"""
-
     alt_title = I18nTextLineField(title=_("Accessibility title"),
                                   description=_("Alternate title used to describe image content"),
                                   required=False)
@@ -85,10 +86,18 @@
 class IExtVideo(IExtMedia):
     """External video file interface"""
 
+    data = I18nVideoField(title=_("Video data"),
+                          description=_("Video content"),
+                          required=True)
+
 
 class IExtAudio(IExtMedia):
     """External audio file interface"""
 
+    data = I18nAudioField(title=_("Audio data"),
+                          description=_("Audio file content"),
+                          required=True)
+
 
 class IExtFileContainerTarget(IAssociationTarget):
     """External files container marker interface"""