# HG changeset patch # User Thierry Florac # Date 1527686005 -7200 # Node ID 4d2dfb68c4a5ef32d95671842dbb757a5c9c3041 # Parent 73e2b54fdb63d2bdfab1f2e299474baa4447d33c Updated fields order diff -r 73e2b54fdb63 -r 4d2dfb68c4a5 src/pyams_content/component/gallery/file.py --- a/src/pyams_content/component/gallery/file.py Wed May 30 11:23:41 2018 +0200 +++ b/src/pyams_content/component/gallery/file.py Wed May 30 15:13:25 2018 +0200 @@ -48,9 +48,9 @@ class GalleryFile(Persistent, Contained): """Gallery file info""" + _data = FileProperty(IGalleryFile['data']) title = FieldProperty(IGalleryFile['title']) alt_title = FieldProperty(IGalleryFile['alt_title']) - _data = FileProperty(IGalleryFile['data']) description = FieldProperty(IGalleryFile['description']) author = FieldProperty(IGalleryFile['author']) author_comments = FieldProperty(IGalleryFile['author_comments']) diff -r 73e2b54fdb63 -r 4d2dfb68c4a5 src/pyams_content/component/gallery/interfaces/__init__.py --- a/src/pyams_content/component/gallery/interfaces/__init__.py Wed May 30 11:23:41 2018 +0200 +++ b/src/pyams_content/component/gallery/interfaces/__init__.py Wed May 30 15:13:25 2018 +0200 @@ -44,6 +44,10 @@ class IGalleryFile(IGalleryItem): """Gallery file marker interface""" + data = MediaField(title=_("Image or video data"), + description=_("Image or video content"), + required=True) + title = I18nTextLineField(title=_("Legend"), required=False) @@ -51,10 +55,6 @@ description=_("Alternate title used to describe media content"), required=False) - data = MediaField(title=_("Image or video data"), - description=_("Image or video content"), - required=True) - description = I18nTextField(title=_("Description"), required=False) diff -r 73e2b54fdb63 -r 4d2dfb68c4a5 src/pyams_content/component/gallery/zmi/interfaces.py --- a/src/pyams_content/component/gallery/zmi/interfaces.py Wed May 30 11:23:41 2018 +0200 +++ b/src/pyams_content/component/gallery/zmi/interfaces.py Wed May 30 15:13:25 2018 +0200 @@ -33,6 +33,10 @@ class IGalleryMediasAddFields(Interface): """Gallery medias add fields""" + medias_data = FileField(title=_("Images or videos data"), + description=_("You can upload a single file or choose to upload a whole ZIP archive"), + required=True) + author = TextLine(title=_("Author"), description=_("Name of document's author"), required=False) @@ -40,7 +44,3 @@ author_comments = I18nTextField(title=_("Author comments"), description=_("Comments relatives to author's rights management"), required=False) - - medias_data = FileField(title=_("Images or videos data"), - description=_("You can upload a single file or choose to upload a whole ZIP archive"), - required=True)